Select to view content in your preferred language

WPF Graphics layers and MouseRightButtonUp event

3683
1
Jump to solution
11-05-2014 02:42 AM
Labels (1)
AlexandrShutko
Deactivated User

Hi. I'm trying to add menus to my map application and there was no problems to do this on graphic objects ("edit", "delete", "show"...),

but also I want  to add context menu to click any point of map and select "Place camera here", "Place object here", etc...

I found that empty graphic layer doesn't trigger mouse event at all and basemap tiled layer doesn't have mouse events and I can't use whole map mouse events because they override graphic objects clicks.

Should I use some kind of "filled" graphic layer ?

0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor

Using both the map mouse event and the graphics layer mouse event should work.

In the graphicslayer mouse event  Handler, set e.Handled to true to prevent the event from being propagated to the map.

So your map mouse event Handler will only be called for mouse events out of existing graphics.

View solution in original post

1 Reply
DominiqueBroux
Esri Frequent Contributor

Using both the map mouse event and the graphics layer mouse event should work.

In the graphicslayer mouse event  Handler, set e.Handled to true to prevent the event from being propagated to the map.

So your map mouse event Handler will only be called for mouse events out of existing graphics.