diff --git a/MapControl/WPF/Map.WPF.cs b/MapControl/WPF/Map.WPF.cs index 6af5eb82..4e21f7da 100644 --- a/MapControl/WPF/Map.WPF.cs +++ b/MapControl/WPF/Map.WPF.cs @@ -72,7 +72,7 @@ namespace MapControl private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { - if (CaptureMouse()) + if (Keyboard.Modifiers == ModifierKeys.None && CaptureMouse()) { mousePosition = e.GetPosition(this); } diff --git a/MapControl/WinUI/Map.WinUI.cs b/MapControl/WinUI/Map.WinUI.cs index 95494530..347a7968 100644 --- a/MapControl/WinUI/Map.WinUI.cs +++ b/MapControl/WinUI/Map.WinUI.cs @@ -3,6 +3,7 @@ // Licensed under the Microsoft Public License (Ms-PL) using System; +using Windows.System; #if WINUI using Microsoft.UI.Input; using Microsoft.UI.Xaml; @@ -61,6 +62,7 @@ namespace MapControl private void OnPointerPressed(object sender, PointerRoutedEventArgs e) { manipulationEnabled = e.Pointer.PointerDeviceType != PointerDeviceType.Mouse || + e.KeyModifiers == VirtualKeyModifiers.None && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed; }