mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.9.0: Reworked MapPanel child arrangement.
This commit is contained in:
parent
9ba43d3a18
commit
a21863e466
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue