mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Update MapScale.cs
This commit is contained in:
parent
928d12876f
commit
0b9b08586e
|
|
@ -45,14 +45,19 @@ namespace MapControl
|
||||||
public MapScale()
|
public MapScale()
|
||||||
{
|
{
|
||||||
MinWidth = 100d;
|
MinWidth = 100d;
|
||||||
|
Children.Add(line);
|
||||||
|
Children.Add(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void SetParentMap(MapBase map)
|
||||||
|
{
|
||||||
|
base.SetParentMap(map);
|
||||||
|
|
||||||
line.SetBinding(Shape.StrokeProperty, this.GetOrCreateBinding(StrokeProperty, nameof(Stroke)));
|
line.SetBinding(Shape.StrokeProperty, this.GetOrCreateBinding(StrokeProperty, nameof(Stroke)));
|
||||||
line.SetBinding(Shape.StrokeThicknessProperty, this.GetOrCreateBinding(StrokeThicknessProperty, nameof(StrokeThickness)));
|
line.SetBinding(Shape.StrokeThicknessProperty, this.GetOrCreateBinding(StrokeThicknessProperty, nameof(StrokeThickness)));
|
||||||
#if WINUI || UWP
|
#if WINUI || UWP
|
||||||
label.SetBinding(TextBlock.ForegroundProperty, this.GetOrCreateBinding(ForegroundProperty, nameof(Foreground)));
|
label.SetBinding(TextBlock.ForegroundProperty, this.GetOrCreateBinding(ForegroundProperty, nameof(Foreground)));
|
||||||
#endif
|
#endif
|
||||||
Children.Add(line);
|
|
||||||
Children.Add(label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Thickness Padding
|
public Thickness Padding
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue