Version 4.7.0: Fixed UWP MapBase.CenterPoint

This commit is contained in:
ClemensFischer 2018-03-11 21:03:44 +01:00
parent 05cf3e7d3d
commit 9566c2d708
3 changed files with 20 additions and 6 deletions

View file

@ -43,6 +43,10 @@ namespace MapControl
0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
(o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue)));
private static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register(
"CenterPoint", typeof(Point), typeof(MapBase),
new PropertyMetadata(new Point(), (o, e) => ((MapBase)o).CenterPointPropertyChanged((Point)e.NewValue)));
static MapBase()
{
ClipToBoundsProperty.OverrideMetadata(typeof(MapBase), new FrameworkPropertyMetadata(true));
@ -63,5 +67,10 @@ namespace MapControl
ResetTransformCenter();
UpdateTransform();
}
private void CenterPointPropertyChanged(Point center)
{
CenterPointPropertyChanged(new Location(center.Y, center.X));
}
}
}