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 FlyoutProperty
Field Value
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenProperty
Field 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
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
objecte
RoutedEventArgs
OnContextMenuOpened(object, RoutedEventArgs)
protected virtual void OnContextMenuOpened(object sender, RoutedEventArgs e)
Parameters
sender
objecte
RoutedEventArgs
OnFlyoutChanged(object)
This method is invoked when the FlyoutProperty changes.
protected virtual void OnFlyoutChanged(object value)
Parameters
value
objectThe new value of FlyoutProperty.
OnIsDropDownOpenChanged(bool)
This method is invoked when the IsDropDownOpenProperty changes.
protected virtual void OnIsDropDownOpenChanged(bool currentValue)
Parameters
currentValue
boolThe new value of IsDropDownOpenProperty.
ReleaseTemplateResources()
Triggered when the control is unloaded. Releases resource bindings.
protected virtual void ReleaseTemplateResources()