示例#1
0
        /// <summary>
        /// Raises Click event of the current item.
        /// </summary>
        ///
        private void RaiseOnClick()
        {
            if (CurrentItem == null)
            {
                return;
            }

            Menu sub = CurrentItem;

            if (sub != null && sub.MenuItems.Count > 0 &&
                (sub.Master == null || sub.Master == this))
            {
                sub.Current = 0;
                sub.Show(this);

                CurrentItem.OnClick(this);

                return;
            }

            HideBranch();

            CurrentItem.OnClick(this);
        }