mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Introduced MapContentControl
This commit is contained in:
parent
207565feba
commit
67e9989327
16 changed files with 218 additions and 143 deletions
|
|
@ -110,10 +110,9 @@ namespace MapControl
|
|||
set { SetValue(StrokeMiterLimitProperty, value); }
|
||||
}
|
||||
|
||||
protected Binding GetBinding(DependencyProperty property, string propertyName)
|
||||
protected Binding GetBinding(string propertyName)
|
||||
{
|
||||
return GetBindingExpression(property)?.ParentBinding ??
|
||||
new Binding { Source = this, Path = new PropertyPath(propertyName) };
|
||||
return new Binding { Source = this, Path = new PropertyPath(propertyName) };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ namespace MapControl
|
|||
{
|
||||
MinWidth = 100d;
|
||||
|
||||
line.SetBinding(Shape.StrokeProperty, GetBinding(StrokeProperty, nameof(Stroke)));
|
||||
line.SetBinding(Shape.StrokeThicknessProperty, GetBinding(StrokeThicknessProperty, nameof(StrokeThickness)));
|
||||
line.SetBinding(Shape.StrokeProperty, GetBinding(nameof(Stroke)));
|
||||
line.SetBinding(Shape.StrokeThicknessProperty, GetBinding(nameof(StrokeThickness)));
|
||||
#if WINDOWS_UWP
|
||||
label.SetBinding(TextBlock.ForegroundProperty, GetBinding(ForegroundProperty, nameof(Foreground)));
|
||||
label.SetBinding(TextBlock.ForegroundProperty, GetBinding(nameof(Foreground)));
|
||||
#endif
|
||||
Children.Add(line);
|
||||
Children.Add(label);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue