Class SplitButton
Controls represents Ribbon split style dropdown button.
Inherited Members
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class SplitButton : DropDownButton, ICollapsable, IRibbonControl, ICommandSource, IDisposable
Constructors
SplitButton()
Initializes a new instance of the SplitButton class.
Declaration
public SplitButton()
Fields
ClickEvent
Routed Click event.
Declaration
public static readonly RoutedEvent ClickEvent
Field Value
Type |
---|
System.Windows.RoutedEvent |
CommandParameterProperty
Defines Command parameter. This is a dependency property.
Declaration
public static readonly DependencyProperty CommandParameterProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CommandProperty
Defines Command associated with control. This is a dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CommandTargetProperty
Defines CommandTarget object. This is a dependency property.
Declaration
public static readonly DependencyProperty CommandTargetProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HitTestAreaProperty
Gets or sets the HitTest area size. This is a dependency property.
Declaration
public static readonly DependencyProperty HitTestAreaProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
Command
Gets or sets the command to invoke when this SplitButton is pressed.
Declaration
public ICommand Command { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Input.ICommand | Type: System.Windows.Input.ICommand A command to invoke when this button is pressed. The default value is null reference (Nothing in Visual Basic). |
Remarks
Implements System.Windows.Input.ICommandSource.Command. This property is used to associate a command with a particular button instance. In Extensible Application Markup Language (XAML), this property is most often set to be a static command value from one of the existing command libraries, such as ApplicationCommands or NavigationCommands. For details, see ICommand.
See Also
CommandParameter
Gets or sets the parameter to pass to the Command property.
Declaration
public object CommandParameter { get; set; }
Property Value
Type | Description |
---|---|
System.Object | Type: System.Object Parameter to pass to the Command property. |
Remarks
Most existing commands from the command libraries do not use a command parameter. Of the commands that do use a command parameter, most of these take a parameter with some primitive type value, such as an integer or a string. However, it is possible to create a custom command where that command expects a non primitive type as its command parameter. For a custom command case like this, setting CommandParameter in code might require a new or existing object instance. Setting CommandParameter in markup might require property element syntax, where the object element filling the property element syntax is a new element of the type expected by that command. Alternatively, setting in markup might require a reference through a markup extension to an existing object
CommandTarget
Gets or sets the element on which to raise the specified command.
Declaration
public IInputElement CommandTarget { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.IInputElement | Type: System.Windows.IInputElement. Element on which to raise a command. |
Remarks
The CommandTarget property cannot be used to define a UIElement. The CommandTarget property provides a reference to an element that is already defined somewhere in your application.
See Also
HitTestArea
Gets or sets the HitTest area size.
Declaration
public HitTestArea HitTestArea { get; set; }
Property Value
Type | Description |
---|---|
HitTestArea | Type: HitTestArea ImageOnly specifies that only image is hit testable for command action, LabelAndImage specifies that image and text is hit testable for command action. Default is LabelAndImage. |
See Also
IsEnabledCore
Gets the value checks core enabled
Declaration
protected override bool IsEnabledCore { get; }
Property Value
Type |
---|
System.Boolean |
Methods
Dispose()
Declaration
public void Dispose()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
Overrides
OnClick()
Called when [click].
Declaration
protected virtual void OnClick()
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. |
Overrides
OnHitTestAreaChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises HitTestAreaChanged event.
Declaration
protected virtual void OnHitTestAreaChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled Keyboard.KeyDown 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 OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The event data |
Overrides
OnMouseLeave(MouseEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave�attached event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseEventArgs | e | The System.Windows.Input.MouseEventArgs that contains the event data. |
Overrides
OnMouseRightButtonUp(MouseButtonEventArgs)
Invoked when an unhandled 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 OnMouseRightButtonUp(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The event data. The event data reports that the left mouse button was released. |
Overrides
OnPreviewKeyDown(KeyEventArgs)
Raises the PreviewKeyDown event.
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | A PreviewKeyDownEventArgs that contains the event data. |
Overrides
Events
Click
Adds or removes handler for click event.
Declaration
public event RoutedEventHandler Click
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
HitTestAreaChanged
Event that is raised when HitTestArea property is changed.
Declaration
public event PropertyChangedCallback HitTestAreaChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |