mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 15:36:20 +00:00
Updated BindingHelper
This commit is contained in:
parent
0714a04a92
commit
928d12876f
7 changed files with 61 additions and 30 deletions
|
|
@ -45,9 +45,14 @@ namespace MapControl
|
|||
|
||||
if (parentMap != null)
|
||||
{
|
||||
this.ValidateProperty(BackgroundProperty, parentMap, nameof(MapBase.Background));
|
||||
this.ValidateProperty(BorderBrushProperty, parentMap, nameof(MapBase.Foreground));
|
||||
this.ValidateProperty(ForegroundProperty, parentMap, nameof(MapBase.Foreground));
|
||||
// If this.Background is not explicitly set, bind it to parentMap.Background
|
||||
this.SetBindingOnUnsetProperty(BackgroundProperty, parentMap, Panel.BackgroundProperty, nameof(Background));
|
||||
|
||||
// If this.Foreground is not explicitly set, bind it to parentMap.Foreground
|
||||
this.SetBindingOnUnsetProperty(ForegroundProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
|
||||
|
||||
// If this.BorderBrush is not explicitly set, bind it to parentMap.Foreground
|
||||
this.SetBindingOnUnsetProperty(BorderBrushProperty, parentMap, MapBase.ForegroundProperty, nameof(Foreground));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue