Exemple #1
0
        /// <summary>
        /// Fires the <see cref="ItemClick"/> event.
        /// </summary>
        /// <param name="e">A <see cref="RibbonBarItemEventArgs"/> that contains the event data.</param>
        protected internal virtual void OnItemClick(RibbonBarItemEventArgs e)
        {
            Debug.Assert(e.Item != null);

            if (this.CausesValidation && !ValidateActiveControl())
            {
                return;
            }

            // dispatch to the child item as well.
            e.Item?.OnClick(EventArgs.Empty);

            ((RibbonBarItemEventHandler)base.Events[nameof(ItemClick)])?.Invoke(this, e);
        }
Exemple #2
0
        /// <summary>
        /// Fires the <see cref="ItemValueChanged"/> event.
        /// </summary>
        /// <param name="e">A <see cref="RibbonBarItemEventArgs"/> that contains the event data.</param>
        protected internal virtual void OnItemValueChanged(RibbonBarItemEventArgs e)
        {
            Debug.Assert(e.Item != null);

            ((RibbonBarItemEventHandler)base.Events[nameof(ItemValueChanged)])?.Invoke(this, e);
        }