Skip to main content

DropDownButton

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class DropDownButton : ToggleButton

A toggle button that displays a flyout in a popup when checked.

Base type: ToggleButton

C# source

Constructors​

public DropDownButton()

Creates a new DropDownButton instance.

Properties​

CornerRadius​

public CornerRadius CornerRadius { get; set; }

Gets or sets the corner radius of the button border.

public CornerRadius DropdownCornerRadius { get; set; }

Gets or sets the corner radius of the dropdown popup surface.

Flyout​

public object Flyout { get; set; }

Gets or sets the content displayed in the dropdown popup.

FlyoutTemplate​

public DataTemplate FlyoutTemplate { get; set; }

Gets or sets the DataTemplate used to render Flyout.

Methods​

CloseFlyout​

public void CloseFlyout()

Closes the dropdown flyout popup if it is open. WinUI's DropDownButton hosts a FlyoutBase whose Hide() the application calls after handling a click inside arbitrary flyout content (a plain flyout never dismisses itself); this method is the equivalent close affordance for the Flyout object content model. Equivalent to setting IsChecked to false.

OnApplyTemplate​

public override void OnApplyTemplate()

Documentation inherited from the ToggleButton API.

OnCreateAutomationPeer​

protected override AutomationPeer OnCreateAutomationPeer()

Documentation inherited from the ToggleButton API.

OnPropertyChanged​

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Documentation inherited from the ToggleButton API.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

CornerRadiusProperty​

public static readonly DependencyProperty CornerRadiusProperty

Identifies the CornerRadius dependency property.

Remarks: Shadows the Control.CornerRadiusProperty introduced in net6+ so the property is also available on net472 where Control does not declare it.

public static readonly DependencyProperty DropdownCornerRadiusProperty

Identifies the DropdownCornerRadius dependency property.

FlyoutProperty​

public static readonly DependencyProperty FlyoutProperty

Identifies the Flyout dependency property.

FlyoutTemplateProperty​

public static readonly DependencyProperty FlyoutTemplateProperty

Identifies the FlyoutTemplate dependency property.