如何删除我的网格角落

时间:2015-09-24 15:37:50

标签: wpf rounded-corners

我的Grid

<Grid HorizontalAlignment="Center" Height="65" Margin="0,0,0,0" VerticalAlignment="Center" Width="352" Background="Gray">
    <Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8"/>
</Grid>

enter image description here

如何使我的角落透明?

1 个答案:

答案 0 :(得分:2)

在边框上设置背景并将边框放在网格周围

<Border BorderBrush="#FF000000" Height="65" Width="352" 
    BorderThickness="1,1,1,1" CornerRadius="8,8,8,8" Background="Gray">
    <Grid HorizontalAlignment="Center" Margin="0,0,0,0"  VerticalAlignment="Center" />
</Border>