Select to view content in your preferred language

Disable ZoomBox (shift + drag) functionality on ArcGISRuntime 200.1 without disabling zoom entirely

601
1
05-10-2023 08:51 AM
Labels (3)
CameronCross
Emerging Contributor

Hello, 

I would like to disable the ZoomBox functionality in ArcGIS Runtime / Maps 200.1 where holding the shift key or shift + ctrl keys and click/dragging doesn't zoom, but the user is still able to zoom normally via the scrollwheel.  

The MapViewInteractionOptions has a "IsZoomEnabled" property, but that globally disables zooming, which is not what we're after.

https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.UI....

Is there a setting in the 200 .net runtime to accomplish this? 

0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor

There is no out-of-the-box setting for disabling individual gestures. However one approach is to override the mapview template. If you in the WPF designer right-click the mapview and select "Edit Template -> Edit a Copy" you'll get access to the XAML control template. In the template find the Rectangle that's called "ZoomBox" and delete it.

0 Kudos