Is there a better option to make a grid with rounded corners? Might this cause any problems?
(Example: Wanted is a corner-radius of 10 & background colour of #FF292A2E)
<Grid Height="300" Width="150" Background="Transparent" >
<Border x:Name="roundBorder" BorderThickness="0" CornerRadius="10" Background="#FF292A2E"/>
</Grid>
I imagine you more want the grid inside the border:
<Border x:Name="roundBorder" BorderThickness="0" CornerRadius="10" Background="#FF292A2E">
<Grid Height="300" Width="150" Background="Transparent" >
</Grid>
</Border>
The Grid
is just a means of laying out controls, so you first create Border
with rounded corners and then add a Grid
to this Border
to which you can now add other things.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.