WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RibbonMenuItem

    Show / Hide Table of Contents

    Class RibbonMenuItem

    Represents a selectable item inside a Menu.

    Inheritance
    System.Object
    RibbonMenuItem
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class RibbonMenuItem : MenuItem, IDisposable
    Remarks

    A RibbonMenuItem can have submenus. The submenu of the RibbonMenuItem is made up of the objects within the ItemCollection of a RibbonMenuItem. It is common for a RibbonMenuItem to contain other RibbonMenuItem objects to create nested submenus.

    Constructors

    RibbonMenuItem()

    Declaration
    public RibbonMenuItem()

    Fields

    IconBarEnabledProperty

    Specifies whether menu icon bar is enabled. This is a dependency property.

    Declaration
    public static readonly DependencyProperty IconBarEnabledProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    IconSizeProperty

    Defines the iconsize that appears in SimpleMenuButton. This is a dependency property.

    Declaration
    public static readonly DependencyProperty IconSizeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    IconBarEnabled

    Gets or sets a value indicating whether menu icon bar is enabled.

    Declaration
    public bool IconBarEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean True if icon bar is enabled, false if disabled.

    Examples
    RibbonMenuItem item;
    // ....
    item.IconBarEnabled = true;

    IconSize

    Gets or sets the size of the icon.

    Declaration
    public Size IconSize { get; set; }
    Property Value
    Type Description
    System.Windows.Size

    The size of the icon.

    Methods

    Dispose()

    Declaration
    public void Dispose()

    GetContainerForItemOverride()

    Creates or identifies the element used to display a specified item.

    Declaration
    protected override DependencyObject GetContainerForItemOverride()
    Returns
    Type Description
    System.Windows.DependencyObject

    A Syncfusion.Windows.Controls.RibbonMenuItem.

    IsItemItsOwnContainerOverride(Object)

    Determines if the specified item is (or is eligible to be) its own ItemContainer.

    Declaration
    protected override bool IsItemItsOwnContainerOverride(object item)
    Parameters
    Type Name Description
    System.Object item

    Specified item.

    Returns
    Type Description
    System.Boolean

    true if the item is its own ItemContainer; otherwise, false.

    OnApplyTemplate()

    Called when the template's tree is generated.

    Declaration
    public override void OnApplyTemplate()

    OnClick()

    Raises the Click event.

    Declaration
    protected override void OnClick()

    OnCreateAutomationPeer()

    Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation infrastructure.

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type Description
    System.Windows.Automation.Peers.AutomationPeer

    The type-specific AutomationPeer implementation.

    OnFlowDirectionChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises FlowDirectionChanged event.

    Declaration
    protected virtual void OnFlowDirectionChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnIconSizeChanged(DependencyPropertyChangedEventArgs)

    Raises the IconSizeChanged event.

    Declaration
    protected virtual void OnIconSizeChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnItemsChanged(NotifyCollectionChangedEventArgs)

    Declaration
    protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    OnMouseEnter(MouseEventArgs)

    Called whenever the mouse enters a System.Windows.Controls.MenuItem.

    Declaration
    protected override void OnMouseEnter(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The event data for the System.Windows.Input.Mouse.MouseEnter event.

    OnMouseLeave(MouseEventArgs)

    Invoked when an unhandled Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The event data

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Invoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

    OnMouseRightButtonUp(MouseButtonEventArgs)

    Called when the right mouse button is released.

    Declaration
    protected override void OnMouseRightButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    The event data for the System.Windows.UIElement.MouseRightButtonUp event.

    OnPreviewKeyDown(KeyEventArgs)

    Invoked when an unhandled Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

    Declaration
    protected override void OnPreviewKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    The event data

    Events

    FlowDirectionChanged

    Event that is raised when FlowDirection property is changed.

    Declaration
    public event PropertyChangedCallback FlowDirectionChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    IconSizeChanged

    Event that is raised when Iconsize property is changed.

    Declaration
    public event PropertyChangedCallback IconSizeChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved