您的位置:首页 > 其它

WPF_圆角图片

2015-08-12 17:18 387 查看
<Border Name="bdGoodDetail"
BorderBrush="#E2E2E2"
BorderThickness="3"
CornerRadius="20">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.65*" />
<RowDefinition Height="0.35*" />
</Grid.RowDefinitions>
<Border Name="imgBorder"
Background="White"
CornerRadius="20,20,0,0" />
<Image Source="{Binding ImageUrl, Mode=OneTime}" Stretch="Fill">
<Image.OpacityMask>
<VisualBrush Visual="{Binding ElementName=imgBorder, Mode=OneTime}" />
</Image.OpacityMask>
</Image>
<Border Grid.Row="1"
Background="White"
CornerRadius="0,0,20,20">
<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock VerticalAlignment="Center"
Style="{StaticResource tbStyle}"
Text="{Binding Price,
Mode=OneWay}" />
<TextBlock Margin="20,18,0,0"
VerticalAlignment="Center"
FontSize="30"
Style="{StaticResource tbStyle}"
Text="元" />
</StackPanel>
</Border>
</Grid>
</Border>


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: