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
});
}
}How I load this ContextMenu when user make a right Click? Any code snippet? Please share
How I load this ContextMenu when user make a right Click? Any code snippet? Please share