Class MenuButtonBase
This class is a base class for Ribbon MenuButton controls.
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public abstract class MenuButtonBase : HeaderedItemsControl, IRibbonControl, IDisposable
Constructors
MenuButtonBase()
Initializes a new instance of the MenuButtonBase class.
Declaration
public MenuButtonBase()
Fields
IconProperty
Defines the icon for a button. This is a dependency property.
Declaration
public static readonly DependencyProperty IconProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsMenuOpenProperty
Defines whether menu is open. This is a dependency property.
Declaration
public static readonly DependencyProperty IsMenuOpenProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LabelProperty
Defines text label information. This is a dependency property.
Declaration
public static readonly DependencyProperty LabelProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
ApplicationMenu
Gets or sets the application menu.
Declaration
protected ApplicationMenu ApplicationMenu { get; set; }
Property Value
Type | Description |
---|---|
ApplicationMenu | The application menu. |
Icon
Gets or sets the icon that appears in menu button.
Declaration
public ImageSource Icon { get; set; }
Property Value
Type |
---|
System.Windows.Media.ImageSource |
Remarks
Many controls have more than just text in the element. Often there is an icon.
See Also
IsMenuOpen
Gets or sets a value indicating whether this instance is menu open.
Declaration
public bool IsMenuOpen { get; set; }
Property Value
Type |
---|
System.Boolean |
Label
Gets or sets the text that labels Menu button.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String | Type: System.String Text that labels the Menu button. The default is empty string. |
See Also
SmallIcon
Gets the value of the Image property.
Declaration
public ImageSource SmallIcon { get; }
Property Value
Type |
---|
System.Windows.Media.ImageSource |
Methods
Dispose()
Dispose all used objects
Declaration
public void Dispose()
GetAppMenu(MenuButtonBase)
Gets application Menu handler.
Declaration
protected ApplicationMenu GetAppMenu(MenuButtonBase child)
Parameters
Type | Name | Description |
---|---|---|
MenuButtonBase | child | Element which Application Menu contains. |
Returns
Type | Description |
---|---|
ApplicationMenu | It returns the GetAppMenu |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnIconChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IconChanged event.
Declaration
protected virtual void OnIconChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnIsMenuOpenChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsMenuOpenChanged event.
Declaration
protected virtual void OnIsMenuOpenChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnLabelChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises LabelChanged event.
Declaration
protected virtual void OnLabelChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnMouseEnter(MouseEventArgs)
Raises the MouseEnter event.
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | An EventArgs that contains the event data. |
OnMouseLeave(MouseEventArgs)
Raises the MouseLeave event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | An EventArgs that contains the event data. |
OnMouseRightButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseRightButtonUp�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 OnMouseRightButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was released. |
OnStylusSystemGesture(StylusSystemGestureEventArgs)
Invoked when an unhandled Stylus. StylusSystemGesture 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 OnStylusSystemGesture(StylusSystemGestureEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.StylusSystemGestureEventArgs | e | The event data |
OnTouchEnter(TouchEventArgs)
Provides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element.
Declaration
protected override void OnTouchEnter(TouchEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.TouchEventArgs | e | The event data. |
OnTouchLeave(TouchEventArgs)
Provides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this element.
Declaration
protected override void OnTouchLeave(TouchEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.TouchEventArgs | e | The event data. |
OnTouchUp(TouchEventArgs)
Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Declaration
protected override void OnTouchUp(TouchEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.TouchEventArgs | e | The event data |
Events
IconChanged
Event that is raised when Icon property is changed.
Declaration
public event PropertyChangedCallback IconChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
IsMenuOpenChanged
Event that is raised when IsMenuOpen property is changed.
Declaration
public event PropertyChangedCallback IsMenuOpenChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
LabelChanged
Event that is raised when Label property is changed.
Declaration
public event PropertyChangedCallback LabelChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
Explicit Interface Implementations
IRibbonControl.get_ToolTip()
Declaration
object IRibbonControl.get_ToolTip()
Returns
Type |
---|
System.Object |