Class MenuButton
Represents a MenuButton control.
Inherited Members
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 |
---|
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 |
---|
System.Windows.PropertyChangedCallback |