SplitButton ClassDW.WPFToolkit Documentation
Shows a button which can be clicked but also expanded to call commands from child elements.
Inheritance Hierarchy

SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              System.Windows.ControlsItemsControl
                System.Windows.Controls.PrimitivesSelector
                  System.Windows.ControlsComboBox
                    DW.WPFToolkit.ControlsSplitButton

Namespace: DW.WPFToolkit.Controls
Assembly: DW.WPFToolkit (in DW.WPFToolkit.dll) Version: 5.6.0.0
Syntax

C#
public class SplitButton : ComboBox

The SplitButton type exposes the following members.

Constructors

  NameDescription
Public methodSplitButton
Initializes a new instance of the SplitButton class
Top
Methods

  NameDescription
Protected methodGetContainerForItemOverride
Generates a new child item container to hold in the SplitButton.
(Overrides ComboBoxGetContainerForItemOverride.)
Protected methodIsItemItsOwnContainerOverride
Checks if the item is already the correct item container. If not the GetContainerForItemOverride will be used to generate the right container.
(Overrides ComboBoxIsItemItsOwnContainerOverride(Object).)
Public methodOnApplyTemplate
The template gets added to the control.
(Overrides ComboBoxOnApplyTemplate.)
Top
Fields

  NameDescription
Public fieldStatic memberClickEvent
Identifies the Click routed event.
Public fieldStatic memberCommandParameterProperty
Identifies the CommandParameter dependency property.
Public fieldStatic memberCommandProperty
Identifies the Command dependency property.
Public fieldStatic memberContentProperty
Identifies the Content dependency property.
Top
Properties

  NameDescription
Public propertyCommand
Gets or sets the command to be called when the button itself is clicked.
Public propertyCommandParameter
Gets or sets the parameter to be passed with the Command.
Public propertyContent
Gets or sets the main content of the button.
Top
Events

  NameDescription
Public eventClick
Occurs when the main button is clicked.
Top
Examples

XAML
<WPFToolkit:SplitButton Content="Main" Command="{Binding MainCommand}">
    <WPFToolkit:SplitButtonItem Content="Sub 1" Command="{Binding Sub1Command}" />
    <WPFToolkit:SplitButtonItem Content="Sub 2" Command="{Binding Sub2Command}" />
    <WPFToolkit:SplitButtonItem Content="Sub 3" Command="{Binding Sub3Command}" />
    <WPFToolkit:SplitButtonItem Content="Sub 4" Command="{Binding Sub4Command}" />
</WPFToolkit:SplitButton>
See Also

Reference