Disable mouse double click zoom

1357
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 Frequent Contributor

WPF or UWP?

0 Kudos
BikeshMaharjan1
New Contributor III

WPF

0 Kudos
dotMorten_esri
Esri Frequent Contributor

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

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

0 Kudos
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 Frequent 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