From a21863e466ef1d55c7cf33e51b84029d3e07b948 Mon Sep 17 00:00:00 2001 From: ClemensF Date: Tue, 1 May 2018 14:29:21 +0200 Subject: [PATCH] Version 4.9.0: Reworked MapPanel child arrangement. --- MapControl/UWP/MapOverlay.UWP.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/MapControl/UWP/MapOverlay.UWP.cs b/MapControl/UWP/MapOverlay.UWP.cs index 10ef5744..74c1217e 100644 --- a/MapControl/UWP/MapOverlay.UWP.cs +++ b/MapControl/UWP/MapOverlay.UWP.cs @@ -58,16 +58,19 @@ namespace MapControl protected override void SetParentMap(MapBase map) { - if (Foreground == null && map != null) + if (map != null) { - SetBinding(ForegroundProperty, - map.GetBindingExpression(MapBase.ForegroundProperty)?.ParentBinding ?? - new Binding { Source = map, Path = new PropertyPath("Foreground") }); - } + if (Foreground == null) + { + SetBinding(ForegroundProperty, + map.GetBindingExpression(MapBase.ForegroundProperty)?.ParentBinding ?? + new Binding { Source = map, Path = new PropertyPath("Foreground") }); + } - if (Stroke == null) - { - SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground))); + if (Stroke == null) + { + SetBinding(StrokeProperty, GetBinding(ForegroundProperty, nameof(Foreground))); + } } base.SetParentMap(map);