mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 4.9.0: Reworked MapPanel child arrangement.
This commit is contained in:
parent
0a7d0fccd2
commit
56d376c4d0
24 changed files with 326 additions and 322 deletions
|
|
@ -12,9 +12,13 @@ namespace MapControl
|
|||
"ParentMap", typeof(MapBase), typeof(MapPanel), new FrameworkPropertyMetadata(
|
||||
null, FrameworkPropertyMetadataOptions.Inherits, ParentMapPropertyChanged));
|
||||
|
||||
public static readonly DependencyProperty ParentMapProperty = ParentMapPropertyKey.DependencyProperty;
|
||||
private static readonly DependencyPropertyKey ViewportPositionPropertyKey = DependencyProperty.RegisterAttachedReadOnly(
|
||||
"ViewportPosition", typeof(Point?), typeof(MapPanel), new PropertyMetadata());
|
||||
|
||||
public static MapBase GetParentMap(UIElement element)
|
||||
public static readonly DependencyProperty ParentMapProperty = ParentMapPropertyKey.DependencyProperty;
|
||||
public static readonly DependencyProperty ViewportPositionProperty = ViewportPositionPropertyKey.DependencyProperty;
|
||||
|
||||
public static MapBase GetParentMap(FrameworkElement element)
|
||||
{
|
||||
return (MapBase)element.GetValue(ParentMapProperty);
|
||||
}
|
||||
|
|
@ -26,5 +30,10 @@ namespace MapControl
|
|||
element.SetValue(ParentMapPropertyKey, element);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetViewportPosition(FrameworkElement element, Point? viewportPosition)
|
||||
{
|
||||
element.SetValue(ViewportPositionPropertyKey, viewportPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue