Table of Contents

Class SplitButton

Namespace
Wpf.Ui.Controls
Assembly
Wpf.Ui.dll

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 FlyoutProperty

Field Value

DependencyProperty

IsDropDownOpenProperty

Identifies the IsDropDownOpen dependency property.

public static readonly DependencyProperty IsDropDownOpenProperty

Field Value

DependencyProperty

Properties

Flyout

Gets or sets the flyout associated with this button.

[Bindable(true)]
public object? Flyout { get; set; }

Property Value

object

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

bool

true if the drop-down is open; otherwise, false. The default is false.

SplitButtonToggleButton

Gets or sets control responsible for toggling the drop-down button.

protected ToggleButton SplitButtonToggleButton { get; set; }

Property Value

ToggleButton

Methods

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

sender object
e RoutedEventArgs

OnContextMenuOpened(object, RoutedEventArgs)

protected virtual void OnContextMenuOpened(object sender, RoutedEventArgs e)

Parameters

sender object
e RoutedEventArgs

OnFlyoutChanged(object)

This method is invoked when the FlyoutProperty changes.

protected virtual void OnFlyoutChanged(object value)

Parameters

value object

The new value of FlyoutProperty.

OnIsDropDownOpenChanged(bool)

This method is invoked when the IsDropDownOpenProperty changes.

protected virtual void OnIsDropDownOpenChanged(bool currentValue)

Parameters

currentValue bool

The new value of IsDropDownOpenProperty.

ReleaseTemplateResources()

Triggered when the control is unloaded. Releases resource bindings.

protected virtual void ReleaseTemplateResources()