public RadContextMenu(RadElement ownerElement) { this.menu = new RadContextMenuDropDown(ownerElement); this.menu.DropDownOpening += new CancelEventHandler(this.menu_DropDownOpening); this.menu.DropDownOpened += new EventHandler(this.menu_DropDownOpened); this.menu.DropDownClosing += new RadPopupClosingEventHandler(this.menu_DropDownClosing); this.menu.DropDownClosed += new RadPopupClosedEventHandler(this.menu_DropDownClosed); this.menu.Items.ItemsChanged += new ItemChangedDelegate(this.Items_ItemsChanged); }
public RadContextMenu(IContainer owner) { if (owner != null) { owner.Add(this); } this.menu = new RadContextMenuDropDown(); this.menu.DropDownOpening += new CancelEventHandler(menu_DropDownOpening); this.menu.DropDownOpened += new EventHandler(menu_DropDownOpened); this.menu.DropDownClosing += new RadPopupClosingEventHandler(menu_DropDownClosing); this.menu.DropDownClosed += new RadPopupClosedEventHandler(menu_DropDownClosed); this.menu.Items.ItemsChanged += new ItemChangedDelegate(Items_ItemsChanged); }