Class SplitMenuButton
Represents SplitMenuButton control.
Inherited Members
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 |
---|
System.Windows.DependencyProperty |
CommandProperty
make Command a dependency property so it can be DataBound
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CommandTargetProperty
make CommandTarget a dependency property so it can be DataBound
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
Type |
---|
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 |
---|
System.Windows.DependencyProperty |
IconStretchProperty
Declaration
public static readonly DependencyProperty IconStretchProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsPressedProperty
Defines whether button is pressed. This is a dependency property.
Declaration
public static readonly DependencyProperty IsPressedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsPressedPropertyKey
Gets whether button is pressed. This is a dependency property key.
Declaration
protected static readonly DependencyPropertyKey IsPressedPropertyKey
Field Value
Type |
---|
System.Windows.DependencyPropertyKey |
SmallIconProperty
Declaration
public static readonly DependencyProperty SmallIconProperty
Field Value
Type |
---|
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 |
---|
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 |
---|
System.Object |
CommandTarget
Gets or sets the command target
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
Type |
---|
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 |
---|
System.Windows.Media.Stretch |
IsPressed
Gets a value indicating whether button is pressed.
Declaration
protected bool IsPressed { get; }
Property Value
Type |
---|
System.Boolean |
SmallIcon
Gets or sets the value for small size of the Icon image
Declaration
public ImageSource SmallIcon { get; set; }
Property Value
Type |
---|
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
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
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
Events
IconSizeChanged
Event that is raised when Iconsize property is changed.
Declaration
public event PropertyChangedCallback IconSizeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
SmallIconChanged
Event that is raised when SmallIcon property is changed.
Declaration
public event PropertyChangedCallback SmallIconChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |