示例#1
0
        private void menu_MouseUp(object sender, MouseEventArgs e)
        {
            RadDropDownMenu menu = (RadDropDownMenu)sender;

            RadElement clickedButton = menu.ElementTree.GetElementAtPoint(e.Location);

            if (clickedButton == null)
            {
                return;
            }

            if (clickedButton is RadComboBoxElement ||
                clickedButton is RadSplitButtonElement ||
                clickedButton is RadDropDownButtonElement ||
                clickedButton is RadArrowButtonElement ||
                clickedButton.Class == "GalleryPopupButtonButton" ||
                clickedButton.Class == "GalleryDownButton" ||
                clickedButton.Class == "GalleryUpButton" ||
                clickedButton is RadGalleryElement)
            {
                return;
            }

            menu.ClosePopup(RadPopupCloseReason.Mouse);
        }
示例#2
0
 /// <summary>
 ///	Closes the RadMenuItemBase popup.
 /// </summary>
 public virtual void HideChildItems()
 {
     if (dropDown != null)
     {
         dropDown.ClosePopup(RadPopupCloseReason.CloseCalled);
     }
 }