private void ContextMenuActivatedHandler(object sender, ContextMenuEventArgs e) { ContextMenuStrip menu = CommandMenuBuilder.BuildContextMenu(e.Menu); if (_contextController != null) _contextController.Dispose(); _contextController = new UICommandController(); _contextController.BindCommandManager(_controller.CommandManager); _contextController.MapMenuItems(menu.Items); menu.Show(this, _pointerController.UntranslatePosition(new Point(e.Location.X, e.Location.Y))); }
protected virtual void OnContextMenuActivated(ContextMenuEventArgs e) { var ev = ContextMenuActivated; if (ev != null) ev(this, e); }