Select to view content in your preferred language

Disable default map navigation options

1587
3
06-16-2011 06:51 AM
PhilippeSteinthal
Deactivated User
Hi,
I need to disable some of the default map navigation options like

Left mouse + Sthif Key + Drag  Drags a zoom box and zooms to the box.
Left mouse + Shift + Ctrl Key + Drag  Drags a zoom box and zooms out around the box.

But in general terms how can that be handled using wpf for the map.
Thanks
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
If you subscribe to Map.MouseLeftButtonDown and set e.Handled = true, this will prevent pan and zoom.
0 Kudos
PhilippeSteinthal
Deactivated User
How about the selection box that comes up with the shift.We do not need it either and the list goes on...
Is not there a wpf way to undo these pre-defined ESRI behavior rather than trying to do it after the fact?
Thanks
0 Kudos
JenniferNery
Esri Regular Contributor
When MouseLeftButtonDown is marked handled, you will not get the envelope used for zooming in/out so the Shift/Ctrl-keys are not even evaluated. Map navigation is disabled.
0 Kudos