Added Avalonia MapOverlay and MapScale

This commit is contained in:
ClemensFischer 2024-05-24 18:24:44 +02:00
parent 192ecbf4df
commit 35c0076336
11 changed files with 210 additions and 123 deletions

View file

@ -57,17 +57,20 @@ namespace MapControl
if (parentMap != null)
{
// If this.Background is not explicitly set, bind it to parentMap.Background.
//
this.SetBindingOnUnsetProperty(BackgroundProperty, parentMap, Panel.BackgroundProperty, nameof(Background));
if (Background == null)
{
SetBinding(BackgroundProperty, parentMap.CreateBinding(nameof(Background)));
}
// If this.Foreground is not explicitly set, bind it to parentMap.Foreground.
//
this.SetBindingOnUnsetProperty(ForegroundProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
if (Foreground == null)
{
SetBinding(ForegroundProperty, parentMap.CreateBinding(nameof(Foreground)));
}
// If this.BorderBrush is not explicitly set, bind it to parentMap.Foreground.
//
this.SetBindingOnUnsetProperty(BorderBrushProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
if (BorderBrush == null)
{
SetBinding(BorderBrushProperty, parentMap.CreateBinding(nameof(Foreground)));
}
}
}
}