WPF

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

    Show / Hide Table of Contents

    Class SplitMenuButton

    Represents SplitMenuButton control.

    Inheritance
    System.Object
    MenuButtonBase
    SplitMenuButton
    Implements
    IRibbonControl
    System.IDisposable
    System.Windows.Input.ICommandSource
    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.Dispose()
    MenuButtonBase.IRibbonControl.get_ToolTip()
    MenuButtonBase.ApplicationMenu
    MenuButtonBase.Label
    MenuButtonBase.Icon
    MenuButtonBase.IsMenuOpen
    MenuButtonBase.IconChanged
    MenuButtonBase.LabelChanged
    MenuButtonBase.IsMenuOpenChanged
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class SplitMenuButton : MenuButtonBase, IRibbonControl, IDisposable, ICommandSource
    Remarks

    SplitMenuButton class represents a control that can display child UIElements in a dropdown popup and can be used in ApplicationMenu control.

    Examples

    This example shows how to create a SplitMenuButton in XAML.

    <ribbon:SplitMenuButton Label="Print" Icon="SampleImages/Print32.png">
    <ribbon:RibbonButton SizeForm = "Small" Label="Item1" SmallIcon="SampleImages/Document32.png"/>
    <ribbon:RibbonButton SizeForm = "Small" Label="Item2" SmallIcon="SampleImages/Document32.png"/>
    </ribbon:SplitMenuButton>

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

    SplitMenuButton button = new SplitMenuButton();
    RibbonMenuItem item = new RibbonMenuItem();
    button.Items.Add(item);

    Constructors

    SplitMenuButton()

    Declaration
    public SplitMenuButton()

    Fields

    CommandParameterProperty

    make CommandParameter a dependency property so it can be DataBound

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

    CommandProperty

    make Command a dependency property so it can be DataBound

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

    CommandTargetProperty

    make CommandTarget a dependency property so it can be DataBound

    Declaration
    public static readonly DependencyProperty CommandTargetProperty
    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

    IconStretchProperty

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

    IsPressedProperty

    Defines whether button is pressed. This is a dependency property.

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

    IsPressedPropertyKey

    Gets whether button is pressed. This is a dependency property key.

    Declaration
    protected static readonly DependencyPropertyKey IsPressedPropertyKey
    Field Value
    Type Description
    System.Windows.DependencyPropertyKey

    SmallIconProperty

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

    Properties

    Command

    Gets or sets the command that will be executed when the command source is invoked.

    Declaration
    public ICommand Command { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    CommandParameter

    Gets or sets the user defined data value that can be passed to the command when it is executed.

    Declaration
    public object CommandParameter { get; set; }
    Property Value
    Type Description
    System.Object

    CommandTarget

    Gets or sets the command target

    Declaration
    public IInputElement CommandTarget { get; set; }
    Property Value
    Type Description
    System.Windows.IInputElement

    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.

    IconStretch

    Gets or sets value which fills the size of Icon.

    Declaration
    public Stretch IconStretch { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Stretch

    IsPressed

    Gets a value indicating whether button is pressed.

    Declaration
    protected bool IsPressed { get; }
    Property Value
    Type Description
    System.Boolean

    SmallIcon

    Gets or sets the value for small size of the Icon image

    Declaration
    public ImageSource SmallIcon { get; set; }
    Property Value
    Type Description
    System.Windows.Media.ImageSource

    Methods

    OnApplyTemplate()

    When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

    Declaration
    public override void OnApplyTemplate()
    Overrides
    MenuButtonBase.OnApplyTemplate()

    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.

    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.

    OnKeyDown(KeyEventArgs)

    Invoked when the System.Windows.UIElement.KeyDown event is received.

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

    Information about the event.

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonDown�routed event is raised on this element. Implement this method to add class handling for this event.

    Declaration
    protected override void OnMouseLeftButtonDown(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 left mouse button was pressed.

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Invoked when an unhandled System.Windows.UIElement.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 System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

    OnMouseMove(MouseEventArgs)

    Invoked when an unhandled System.Windows.Input.Mouse.MouseMove�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 OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    The System.Windows.Input.MouseEventArgs that contains the event data.

    OnSmallIconChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises LabelChanged event.

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

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

    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

    Overrides
    MenuButtonBase.OnStylusSystemGesture(StylusSystemGestureEventArgs)

    OnTouchDown(TouchEventArgs)

    Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.

    Declaration
    protected override void OnTouchDown(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

    Overrides
    MenuButtonBase.OnTouchUp(TouchEventArgs)

    Events

    IconSizeChanged

    Event that is raised when Iconsize property is changed.

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

    SmallIconChanged

    Event that is raised when SmallIcon property is changed.

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

    Implements

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