Esempio n. 1
0
        /// <summary>
        /// Fires the <see cref="MenuButtonItemClick" /> event.
        /// </summary>
        /// <param name="e">A <see cref="MenuButtonItemClickedEventArgs" /> that contains the event data. </param>
        protected internal virtual void OnMenuButtonItemClick(RibbonBarMenuItemEventArgs e)
        {
            if (this.CausesValidation && !ValidateActiveControl())
            {
                return;
            }

            // dispatch to the child item as well.
            e.Item?.OnItemClick(e);

            ((RibbonBarMenuItemEventHandler)base.Events[nameof(MenuButtonItemClick)])?.Invoke(this, e);
        }
 /// <summary>
 /// Fires the <see cref="ItemClicked" /> event.
 /// </summary>
 /// <param name="e">A <see cref="RibbonBarMenuItemEventArgs" /> that contains the event data. </param>
 protected internal virtual void OnItemClick(RibbonBarMenuItemEventArgs e)
 {
     ((RibbonBarMenuItemEventHandler)base.Events[nameof(ItemClicked)])?.Invoke(this, e);
 }