There is a Border when using the property Corner Radius 4 corners are rounded at once. How to be if I need to round only the top?
2 answers
In order to set the rounding at the upper right corner, you need to use the CornerRadius property. It is important to understand that this property may contain not one value, but several.
If you immediately specify 4 digits, as in this case, the первая цифра in the value will mean the верхний левый угол , the вторая цифра - the верхний правый угол , the третья цифра - the нижний правый угол , the четвертая цифра - the нижний левый угол . The example below sets the round at the upper left corner.
<Border BorderBrush="Red" BorderThickness="2" CornerRadius="10 0 0 0"> <Button>Кнопка</Button> </Border> The CornerRadius property is not of double type, but of CornerRadius , and allows you to set individual values for each of the corners. Syntax:
<Border CornerRadius="topLeft,topRight,bottomRight,bottomLeft"/> For your case, for example
<Border CornerRadius="10,10,0,0"/>