// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control // © 2020 Clemens Fischer // Licensed under the Microsoft Public License (Ms-PL) #if WINDOWS_UWP using Windows.UI.Xaml; #else using System.Windows; #endif namespace MapControl { /// /// MapBase with default input event handling. /// public partial class Map : MapBase { public static readonly DependencyProperty MouseWheelZoomDeltaProperty = DependencyProperty.Register( nameof(MouseWheelZoomDelta), typeof(double), typeof(Map), new PropertyMetadata(1d)); /// /// Gets or sets the amount by which the ZoomLevel property changes during a MouseWheel event. /// The default value is 1. /// public double MouseWheelZoomDelta { get { return (double)GetValue(MouseWheelZoomDeltaProperty); } set { SetValue(MouseWheelZoomDeltaProperty, value); } } private Vector translation; private double rotation; private double scale = 1d; private bool transformPending; private void ResetTransform() { translation.X = 0d; translation.Y = 0d; rotation = 0d; scale = 1d; transformPending = false; } } }