Windows.UI.Xaml.Controls.CommandBar.PrimaryCommands

June 22, 2022 ยท View on GitHub

-description

Gets the collection of primary command elements for the CommandBar.

-xaml-syntax

<CommandBar>
    <CommandBar.PrimaryCommands>
      commandBarElements
    </CommandBar.PrimaryCommands>
</CommandBar>

-xaml-values

commandBarElements
commandBarElementsOne or more object elements for classes that implement ICommandBarElement. These are typically AppBarButton, AppBarToggleButton or AppBarSeparator elements.
## -property-value The collection of primary command elements for the [CommandBar](commandbar.md). The default is an empty collection.

-remarks

The PrimaryCommands collection can contain only AppBarButton, AppBarToggleButton, or AppBarSeparator command elements. The primary commands are shown on the right side of the CommandBar, to the left of the More button (...) when the FlowDirection is LeftToRight. The layout is reversed when the FlowDirection is RightToLeft.

-examples

-see-also

SecondaryCommands