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

@ -46,10 +46,10 @@ namespace MapControl
{
MinWidth = 100d;
line.SetBinding(Shape.StrokeProperty, this.GetBinding(nameof(Stroke)));
line.SetBinding(Shape.StrokeThicknessProperty, this.GetBinding(nameof(StrokeThickness)));
line.SetBinding(Shape.StrokeProperty, this.GetOrCreateBinding(StrokeProperty, nameof(Stroke)));
line.SetBinding(Shape.StrokeThicknessProperty, this.GetOrCreateBinding(StrokeThicknessProperty, nameof(StrokeThickness)));
#if WINUI || UWP
label.SetBinding(TextBlock.ForegroundProperty, this.GetBinding(nameof(Foreground)));
label.SetBinding(TextBlock.ForegroundProperty, this.GetOrCreateBinding(ForegroundProperty, nameof(Foreground)));
#endif
Children.Add(line);
Children.Add(label);