我有一些 WPF 代码将块绑定到颜色,如下所示:
<GeometryDrawing>
<GeometryDrawing.Brush>
<LinearGradientBrush>
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.00" Color="{Binding Path=Element.Color}"/>
<GradientStop Offset="1.00" Color="{Binding Path=Element.Color}"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</GeometryDrawing.Brush>
</GeometryDrawing>
现在我想将边框(或 Pen 属性)绑定到另一个字段,例如 Element.BorderColor。那应该怎么做?
谢谢