2012-11-23 16:16:09 +01:00
|
|
|
|
// XAML Map Control - http://xamlmapcontrol.codeplex.com/
|
2013-05-07 18:12:25 +02:00
|
|
|
|
// Copyright © Clemens Fischer 2012-2013
|
2012-11-23 16:16:09 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class MapPanel
|
|
|
|
|
|
{
|
2013-04-12 19:59:16 +02:00
|
|
|
|
private static readonly DependencyPropertyKey ParentMapPropertyKey = DependencyProperty.RegisterAttachedReadOnly(
|
2012-11-23 16:16:09 +01:00
|
|
|
|
"ParentMap", typeof(MapBase), typeof(MapPanel),
|
|
|
|
|
|
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Inherits, ParentMapPropertyChanged));
|
|
|
|
|
|
|
2013-04-12 19:59:16 +02:00
|
|
|
|
public static readonly DependencyProperty ParentMapProperty = ParentMapPropertyKey.DependencyProperty;
|
|
|
|
|
|
|
2012-11-23 16:16:09 +01:00
|
|
|
|
public static MapBase GetParentMap(UIElement element)
|
|
|
|
|
|
{
|
|
|
|
|
|
return (MapBase)element.GetValue(ParentMapProperty);
|
|
|
|
|
|
}
|
2013-04-12 19:59:16 +02:00
|
|
|
|
|
|
|
|
|
|
internal void SetParentMap()
|
|
|
|
|
|
{
|
|
|
|
|
|
SetValue(ParentMapPropertyKey, this);
|
|
|
|
|
|
}
|
2012-11-23 16:16:09 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|