Class SplitButton
Represents a button with two parts that can be invoked separately. One part behaves like a standard button and the other part invokes a flyout.
[TemplatePart(Name = "PART_ToggleButton", Type = typeof(ToggleButton))]
public class SplitButton : Button, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, ICommandSource, IAppearanceControl, IIconControl- Inheritance
- 
      
      
      
      
      
      
      
      
      
      
      
      SplitButton
- Implements
- Inherited Members
Constructors
SplitButton()
public SplitButton()Fields
FlyoutProperty
Identifies the Flyout dependency property.
public static readonly DependencyProperty FlyoutPropertyField Value
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenPropertyField Value
Properties
Flyout
Gets or sets the flyout associated with this button.
[Bindable(true)]
public object? Flyout { get; set; }Property Value
IsDropDownOpen
Gets or sets a value indicating whether the drop-down for a button is currently open.
[Bindable(true)]
[Browsable(false)]
public bool IsDropDownOpen { get; set; }Property Value
SplitButtonToggleButton
Gets or sets control responsible for toggling the drop-down button.
protected ToggleButton SplitButtonToggleButton { get; set; }Property Value
Methods
AttachTemplateResources()
protected virtual void AttachTemplateResources()OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()OnContextMenuClosed(object, RoutedEventArgs)
protected virtual void OnContextMenuClosed(object sender, RoutedEventArgs e)Parameters
- senderobject
- eRoutedEventArgs
OnContextMenuOpened(object, RoutedEventArgs)
protected virtual void OnContextMenuOpened(object sender, RoutedEventArgs e)Parameters
- senderobject
- eRoutedEventArgs
OnFlyoutChanged(object)
This method is invoked when the FlyoutProperty changes.
protected virtual void OnFlyoutChanged(object value)Parameters
- valueobject
- The new value of FlyoutProperty. 
OnIsDropDownOpenChanged(bool)
This method is invoked when the IsDropDownOpenProperty changes.
protected virtual void OnIsDropDownOpenChanged(bool currentValue)Parameters
- currentValuebool
- The new value of IsDropDownOpenProperty. 
ReleaseTemplateResources()
Triggered when the control is unloaded. Releases resource bindings.
protected virtual void ReleaseTemplateResources()