diff --git a/SampleApps/WpfApplication/MainWindow.xaml b/SampleApps/WpfApplication/MainWindow.xaml index 635cd5b0..fd05e4fb 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml +++ b/SampleApps/WpfApplication/MainWindow.xaml @@ -118,7 +118,6 @@ MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" Center="53.5,8.2" ManipulationMode="All" MouseLeftButtonDown="MapMouseLeftButtonDown" - MouseLeftButtonUp="MapMouseLeftButtonUp" MouseRightButtonDown="MapMouseRightButtonDown" MouseRightButtonUp="MapMouseRightButtonUp" MouseMove="MapMouseMove" diff --git a/SampleApps/WpfApplication/MainWindow.xaml.cs b/SampleApps/WpfApplication/MainWindow.xaml.cs index e9f1c334..a9b0964e 100644 --- a/SampleApps/WpfApplication/MainWindow.xaml.cs +++ b/SampleApps/WpfApplication/MainWindow.xaml.cs @@ -46,7 +46,7 @@ namespace SampleApplication private async void MapMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { - if (e.ClickCount == 2) + if (e.ClickCount == 2 && e.Source == map) { map.TargetCenter = map.ViewToLocation(e.GetPosition(map)); } @@ -55,15 +55,6 @@ namespace SampleApplication { Debug.WriteLine(await wmsLayer.GetFeatureInfoAsync(e.GetPosition(map))); } - else - { - map.Cursor = Cursors.ScrollAll; - } - } - - private void MapMouseLeftButtonUp(object sender, MouseButtonEventArgs e) - { - map.Cursor = null; } private void MapMouseRightButtonDown(object sender, MouseButtonEventArgs e)