Version 4.9.0: Reworked MapPanel child arrangement.

This commit is contained in:
ClemensF 2018-04-30 23:13:50 +02:00
parent 0a7d0fccd2
commit 56d376c4d0
24 changed files with 326 additions and 322 deletions

View file

@ -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);
}
}
}