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 }); } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.