gpt4 book ai didi

c# - 如何在 WPF 中创建带圆角的虚线边框?

转载 作者:IT王子 更新时间:2023-10-29 04:10:25 24 4
gpt4 key购买 nike

Rectangle 元素有 StrokeDashArray 允许用破折号绘制它,但它不支持圆角。 Border 控件支持漂亮的圆角粗线,但只会绘制实线。

使用任何控件实现带圆角的虚线边框的最佳方法是什么?

Example of dashed border http://img524.imageshack.us/img524/3186/dashedborder.png

最佳答案

你错了,Rectangle 不支持这个:

<Rectangle StrokeDashArray="0.5 1.0 0.3" Stroke="Black" StrokeThickness="2" RadiusX="10" RadiusY="10"/>

enter image description here

关于c# - 如何在 WPF 中创建带圆角的虚线边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1048137/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com