mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Avalonia Pushpin
This commit is contained in:
parent
1788da27bd
commit
8e4110b600
10 changed files with 287 additions and 133 deletions
|
|
@ -59,15 +59,14 @@ namespace MapControl
|
|||
|
||||
private static readonly DependencyProperty ParentMapProperty =
|
||||
DependencyPropertyHelper.RegisterAttached<MapPanel, MapBase>("ParentMap", null,
|
||||
(element, oldValue, newValue) => SetParentMap(element, newValue), true);
|
||||
|
||||
private static void SetParentMap(FrameworkElement element, MapBase parentMap)
|
||||
{
|
||||
if (element is IMapElement mapElement)
|
||||
{
|
||||
mapElement.ParentMap = parentMap;
|
||||
}
|
||||
}
|
||||
(element, oldValue, newValue) =>
|
||||
{
|
||||
if (element is IMapElement mapElement)
|
||||
{
|
||||
mapElement.ParentMap = newValue;
|
||||
}
|
||||
},
|
||||
true); // inherits
|
||||
|
||||
private MapBase parentMap;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue