WPF

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

    Show / Hide Table of Contents

    Class MenuButton

    Represents a MenuButton control.

    Inheritance
    System.Object
    MenuButtonBase
    MenuButton
    Implements
    IRibbonControl
    System.IDisposable
    Inherited Members
    MenuButtonBase.LabelProperty
    MenuButtonBase.IconProperty
    MenuButtonBase.IsMenuOpenProperty
    MenuButtonBase.GetAppMenu(MenuButtonBase)
    MenuButtonBase.OnLabelChanged(DependencyPropertyChangedEventArgs)
    MenuButtonBase.OnIconChanged(DependencyPropertyChangedEventArgs)
    MenuButtonBase.OnIsMenuOpenChanged(DependencyPropertyChangedEventArgs)
    MenuButtonBase.OnMouseEnter(MouseEventArgs)
    MenuButtonBase.OnTouchEnter(TouchEventArgs)
    MenuButtonBase.OnMouseLeave(MouseEventArgs)
    MenuButtonBase.OnTouchLeave(TouchEventArgs)
    MenuButtonBase.OnMouseRightButtonUp(MouseButtonEventArgs)
    MenuButtonBase.OnTouchUp(TouchEventArgs)
    MenuButtonBase.OnStylusSystemGesture(StylusSystemGestureEventArgs)
    MenuButtonBase.OnApplyTemplate()
    MenuButtonBase.Dispose()
    MenuButtonBase.IRibbonControl.get_ToolTip()
    MenuButtonBase.ApplicationMenu
    MenuButtonBase.Label
    MenuButtonBase.Icon
    MenuButtonBase.IsMenuOpen
    MenuButtonBase.SmallIcon
    MenuButtonBase.IconChanged
    MenuButtonBase.LabelChanged
    MenuButtonBase.IsMenuOpenChanged
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class MenuButton : MenuButtonBase, IRibbonControl, IDisposable
    Remarks

    MenuButton class represents menu button control that can be used in ApplicationMenu control.

    Examples

    This example shows how to create a MenuButton in XAML.

    <ribbon:MenuButton Label="Send" Icon="SampleImages/Send32.png">
        <ribbon:ApplicationMenuGroup Header="Send a copy of the document">
            <ribbon:SimpleMenuButton Label="E-mail" Description="Send a copy of the document in an e-mail message as an attachment."  Icon="SampleImages/Email.png"/>
            <ribbon:SimpleMenuButton Label="Internet Fax" Description="Use an internet fax service to fax the document." Icon="SampleImages/Fax.png"/>
        </ribbon:ApplicationMenuGroup>
    </ribbon:MenuButton>

    This example shows how to create a ButtonPanel in C#.

        
    SimpleMenuButton button1;
    SimpleMenuButton button2;
    MenuButton menuButton = new MenuButton();
    menuButton.Items.Add(button1);
    menuButton.Items.Add(button2);

    Constructors

    MenuButton()

    Declaration
    public MenuButton()

    Fields

    DescriptionProperty

    Defines the description of the MenuButton. This is a dependency property.

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

    Properties

    Description

    Gets or sets the description of the MenuButton.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String

    Type: System.String String value that will be displayed in the MenuButton.

    Methods

    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.

    OnDescriptionChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises DescriptionChanged event.

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

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

    Events

    DescriptionChanged

    Event that is raised when Description property is changed.

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

    Implements

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