I have some WPF code binding a block to a color as follows:
<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>
Now I want to bind the border (or Pen property) to another field, such as Element.BorderColor. How should that be done?
Thanks
You can use the ElementName binding to bind to properties in other UI elements in your window