Table of Contents

Class DropDownButton

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

A control that drop downs a flyout of choices from which one can be chosen.

public class DropDownButton : Button, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, ICommandSource, IAppearanceControl, IIconControl
Inheritance
DropDownButton
Implements
Inherited Members

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.

Methods

OnClick()

Called when a Button is clicked.

protected override void OnClick()

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)

protected virtual void OnIsDropDownOpenChanged(bool currentValue)

Parameters

currentValue bool