Mouse Wheel events for MapControl

256
4
Jump to solution
03-05-2024 07:03 AM
AzharIbrahim
New Contributor III

I'm using a map in a map control as a secondary map in a pro window. I've tried to use the MouseWheel event and the PreviewMouseWheel event. Neither gets triggered. How should I be using these events? I didn't find anything in the two samples that are normally given for MapControl (overview and magnifier).  I'm creating a new map and adding layers which are then used to create the ViewContent for the MapControl. MapView.Active never points to the MapControl even when I'm using the MapControl map, so those options are not available..

I can get the mouse move event, but not the mouse left button down or mouse hweel. This includes the preview.

I'm currently still using version 3.0.3.

 

0 Kudos
1 Solution

Accepted Solutions
CharlesMacleod
Esri Regular Contributor

This is not currently supported. Thank u for the requirement. We will look into adding event subscription for the control at 3.4.

View solution in original post

0 Kudos
4 Replies
CharlesMacleod
Esri Regular Contributor

This is not currently supported. Thank u for the requirement. We will look into adding event subscription for the control at 3.4.

0 Kudos
AzharIbrahim
New Contributor III

Thank you for looking into this. Since the documentation includes mouse events for the map control it's a bit confusing as to what is actually supported.

0 Kudos
CharlesMacleod
Esri Regular Contributor

can u point me to the incorrect documentation please? I did a quick scan of https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Map-Exploration#mapcontrol  but didnt see a reference to Mouse events....I wld like to correct it.

 

fyi: perhaps because u r "seeing" the inherited events from the base WPF UIElement class on the api reference? https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12547.html#EventsBookmark 

If u uncheck "Include Inherited Members" u will see only the events implemented on the map control itself

api-ref-uncheck.jpg

 

0 Kudos
AzharIbrahim
New Contributor III

That was it. thank you. I did get the mouse enter event to work, but none of the others.

0 Kudos