WPF设置圆角图片

<!-- 圆角图片 -->
<Border 
	Grid.Column="0" 
	Height="130"
	Name="imgBorder"
	Background="Black"
	CornerRadius="8" />
<Image 
	Grid.Column="0" 
	Tag="{Binding pic}" 
	Width="94" Height="130"
	Stretch="Fill"
	HorizontalAlignment="Stretch"
	VerticalAlignment="Stretch"
	Loaded="Image_Loaded" 
	Unloaded="Image_Unloaded">
	<Image.OpacityMask>
		<VisualBrush Visual="{Binding ElementName=imgBorder, Mode=OneTime}" />
	</Image.OpacityMask>
</Image>

猜你喜欢

转载自blog.csdn.net/FireGhost57/article/details/87001389