我想要一个如图所示的半圆角矩形,但只有 2 个边缘是圆角的。
我尝试过使用 RadiusX=""RadiusY=""
,但它使所有 4 个边缘都变圆。
最佳答案
如果您使用Border
,您可以指定四种不同的半径(topLeft
、topRight
、bottomRight
、bottomLeft
) 用逗号分隔,例如:
<Border BorderBrush="Blue" BorderThickness="3" CornerRadius="5,5,0,0" Margin="10">
<TextBlock>....</TextBlock>
</Border>
关于c# - 如何绘制半圆角矩形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49981910/