CommandBarFlyout.PrimaryCommands Property


Gets the collection of primary command elements for the CommandBarFlyout.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.CommandBarFlyout.PrimaryCommands (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

 property IObservableVector<ICommandBarElement ^> ^ PrimaryCommands { IObservableVector<ICommandBarElement ^> ^ get(); };
IObservableVector<ICommandBarElement> PrimaryCommands();
public IObservableVector<ICommandBarElement> PrimaryCommands { get; }
var iObservableVector = commandBarFlyout.primaryCommands;
Public ReadOnly Property PrimaryCommands As IObservableVector(Of ICommandBarElement)

Property Value


The collection of primary command elements for the CommandBarFlyout. The default is an empty collection.


The PrimaryCommands collection can directly contain only AppBarButton, AppBarToggleButton, AppBarSeparator command elements. Other elements must be wrapped in an AppBarElementContainer.

The primary commands are shown in the command bar portion of the flyout.

Applies to

See also