Restore MapBase.ViewScale property

This commit is contained in:
ClemensFischer 2022-11-02 19:49:18 +01:00
parent 10f89b0da9
commit 14c26b34e8
3 changed files with 26 additions and 0 deletions

View file

@ -42,6 +42,11 @@ namespace MapControl
0d, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
(o, e) => ((MapBase)o).TargetHeadingPropertyChanged((double)e.NewValue)));
private static readonly DependencyPropertyKey ViewScalePropertyKey = DependencyProperty.RegisterReadOnly(
nameof(ViewScale), typeof(double), typeof(MapBase), new PropertyMetadata(0d));
public static readonly DependencyProperty ViewScaleProperty = ViewScalePropertyKey.DependencyProperty;
private static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register(
"CenterPoint", typeof(Point), typeof(MapBase), new PropertyMetadata(new Point(),
(o, e) =>
@ -63,5 +68,10 @@ namespace MapControl
ResetTransformCenter();
UpdateTransform();
}
private void SetViewScale(double scale)
{
SetValue(ViewScalePropertyKey, scale);
}
}
}