I have a Border
with CornerRadius
property set to 10. Inside that Border
, there's a StackPanel
. The panel contains two Border
s with blue and red backgrounds, respectively.
The upper left and upper right corners of the blue border and the lower left and lower right corners of the red border are sticking out of the curved edges of the first border. I wish to make the blue and red borders trim to the parent border. Is that possible?
By the way, I do know that if I set the same value for CornerRadius
property of the blue and red borders, it will follow the curve of the first one. I don't want that - I want trimming. Thanks!
<Border
Width="200"
Height="200"
BorderThickness="1"
BorderBrush="Black"
CornerRadius="10">
<StackPanel>
<Border Height="100" Background="Blue" />
<Border Height="100" Background="Red" />
</StackPanel>
</Border>