Hi,
Am trying to add context menu items to my marker object. The code generally goes like this:
Marker markerObj = new Marker(e.WorldX, e.WorldY);
ContextMenu menu1 = (ContextMenu)FindResource("ShapeContextMenu");
Binding binding = new Binding() { Source = menu1 };
markerObj.SetBinding(Marker.ContextMenuProperty, binding);
Xaml:
UserControl.Resources
ContextMenu x:Key="ShapeContextMenu"
MenuItem Header="Delete" Click="Delete_Shape"/
/ContextMenu
/UserControl.Resources
But i am not getting the specified context menu item on right click.
Please let me know what am missing.