Disable mouse double click zoom

1943
6
10-04-2017 09:20 AM
BikeshMaharjan1
New Contributor III

I wanted to remove mouse double click zoom but retain the scroll wheel zoom. Is it possible?

Tags (2)
0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor

WPF or UWP?

0 Kudos
BikeshMaharjan1
New Contributor III

WPF

0 Kudos
dotMorten_esri
Esri Notable Contributor

You just handle the doubleclick preview-event, which prevents the mapview from receiving the double-click:

myMapView.PreviewMouseDoubleClick += (s, e) => e.Handled = true;

BikeshMaharjan1
New Contributor III

I want to use MyMapView_GeoViewDoubleTapped though. Is there any other way?

0 Kudos
AndyWright
Occasional Contributor

Hi Morten.  How would I accomplish this in Xamarin?  There is no PreviewMouseDoubleClick event to work with there.  And just setting handled = true in the GeoViewDoubleTapped event does not do the trick.

0 Kudos
dotMorten_esri
Esri Notable Contributor

The double tapped event is too late. I believe if you handle it in the GeoViewTapped event, the doubletapped won't fire.

Alternatively, you can use the MapView.InteractionOptions to disable zoom.

0 Kudos