mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 14:08:32 +00:00
Version 4.7.0: Fixed UWP MapBase.CenterPoint
This commit is contained in:
parent
05cf3e7d3d
commit
9566c2d708
3 changed files with 20 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue