是否可以在 XAML 中创建一条线(没有任何 C# 代码)来对齐布局容器(如网格)内的一条线?
我想有效地拥有:
<Grid>
<Line StrokeThickness="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
Stroke="Red"/>
</Grid>
我需要使用StrokeDashArray
and StrokeDashOffset
,否则我只会使用一个Border
将 BorderThickness 设置为"0,0,0,1"
...的控件
感谢您的任何想法!