I want to create a context menu within a dialog and im trying to use this event ContextMenuCreated from the List View control. So i create the context menu with that but i want to know how can i delegate methods to those menu items that I’ve created. This is the code:
dialogFilter.RegisterForContextMenu(listView);
listView.ContextMenuCreated += delegate(object sender, CreateContextMenuEventArgs e) {
e.Menu.SetHeaderTitle("Options");
e.Menu.Add(0,1,1,"Edit");
e.Menu.Add(0,2,1,"Delete");
};
Maybe this is what you are looking for:
Hope that helps.