Skip to main content

CommandBarFlyout

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class CommandBarFlyout : FlyoutBase

Represents a flyout that shows a horizontal bar of primary commands with an optional expandable overflow menu of secondary commands, mirroring the WinUI 3 CommandBarFlyout control.

Remarks: Commands are usually AppBarButton instances. Clicking a command inside the flyout runs its normal Click handling and then dismisses the flyout, matching the WinUI behavior. The flyout participates in the full FlyoutBase contract: it can be opened via ShowAt or attached to an element with SetAttachedFlyout and opened via ShowAttachedFlyout. The WinUI AlwaysExpanded option is omitted for v1; the flyout always opens collapsed and the overflow menu is toggled by the presenter's more button.

Base type: FlyoutBase

C# source

Constructors​

CommandBarFlyout​

public CommandBarFlyout()

Creates a new CommandBarFlyout instance.

Properties​

PrimaryCommands​

public ObservableCollection<UIElement> PrimaryCommands { get; }

Gets the commands shown in the always-visible horizontal primary bar.

SecondaryCommands​

public ObservableCollection<UIElement> SecondaryCommands { get; }

Gets the commands shown in the expandable overflow menu below the primary bar. The presenter's more button is only visible while this collection is non-empty.

Methods​

CreatePresenter​

protected override FrameworkElement CreatePresenter()

Creates (or returns the cached) CommandBarFlyoutPresenter bound to this flyout's PrimaryCommands and SecondaryCommands.

Returns: The presenter hosting the command bar.