WPF Graphics layers and MouseRightButtonUp event

3156
1
Jump to solution
11-05-2014 02:42 AM
AlexandrShutko
New Contributor

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.

View solution in original post