Updated BindingHelper

This commit is contained in:
Clemens 2021-12-01 20:15:48 +01:00
parent 0714a04a92
commit 928d12876f
7 changed files with 61 additions and 30 deletions

View file

@ -65,7 +65,9 @@ namespace MapControl
protected override void OnInitialized(EventArgs e)
{
base.OnInitialized(e);
this.ValidateProperty(StrokeProperty, this, nameof(Foreground));
// If this.Stroke is not explicitly set, bind it to this.Foreground
this.SetBindingOnUnsetProperty(StrokeProperty, this, ForegroundProperty, nameof(Foreground));
}
public Pen CreatePen()