mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
ParentMap property initialization
This commit is contained in:
parent
6a9b622793
commit
207565feba
12 changed files with 86 additions and 47 deletions
|
|
@ -23,6 +23,11 @@ namespace MapControl
|
|||
private static readonly DependencyProperty ViewPositionProperty = DependencyProperty.RegisterAttached(
|
||||
"ViewPosition", typeof(Point?), typeof(MapPanel), new PropertyMetadata(null));
|
||||
|
||||
public MapPanel()
|
||||
{
|
||||
InitMapElement(this);
|
||||
}
|
||||
|
||||
public static void InitMapElement(FrameworkElement element)
|
||||
{
|
||||
if (element is MapBase)
|
||||
|
|
@ -31,7 +36,7 @@ namespace MapControl
|
|||
}
|
||||
else
|
||||
{
|
||||
// Workaround for missing property value inheritance in Windows Runtime.
|
||||
// Workaround for missing property value inheritance in UWP.
|
||||
// Loaded and Unloaded handlers set and clear the ParentMap property value.
|
||||
|
||||
element.Loaded += (s, e) => GetParentMap(element);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue