How I load this ContextMenu when user make a right Click? Any code snippet? Please share
class MyGraphic : ESRI.ArcGIS.Client.Graphic { public MyGraphic() { MouseRightButtonUp += (sender, e) => { ContextMenu contextMenu = BuildContextMenu(); contextMenu.IsOpen = true; e.Handled = true; }; } private ContextMenu BuildContextMenu() { ContextMenu contextMenu = new ContextMenu(); BuildContextMenuCore(contextMenu); return contextMenu; } protected virtual void BuildContextMenuCore(ContextMenu contextMenu) { contextMenu.Items.Add(new MenuItem { Header = "Properties", CommandParameter = this, Command = Commands.Map.Properties }); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.