Reputation: 117
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>
Upvotes: 1
Views: 2113
Reputation: 4679
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.
Upvotes: 1