EditorWithText editor = new EditorWithText();this.dayView.AppointmentEditor = editor;editor.AfterEnterEditMode += new EventHandler(this.editor_AfterEnterEditMode);editor.BeforeExitEditMode += new BeforeExitEditModeEventHandler(editor_BeforeExitEditMode);
private void editor_AfterEnterEditMode(object sender, EventArgs e){ ContextMenu contextMenu = new ContextMenu(); contextMenu.MenuItems.Add( "One" ); contextMenu.MenuItems.Add( "Two" ); contextMenu.MenuItems.Add( "Three" );
this.dayView.Controls[0].ContextMenu = contextMenu;}
private void editor_BeforeExitEditMode(object sender, BeforeExitEditModeEventArgs e){ // TODO: Clean up context menu}
do you mean change the color of the "CONTEXT Menu" ??? Similar to that when you right mouse click in Windows Explorer?
Or do you mean use context sensitive Ribbon tabs?
Gees! I don't know what I was looking at when I read your post... it must be late! (1am) on second reading and after seeing Brians solution below I will retract my previous questions :)