Windows Dev Center

CommandBar.PrimaryCommands property

Gets the collection of primary command elements for the CommandBar.

Syntax


Public ReadOnly Property PrimaryCommands As IObservableVector(Of ICommandBarElement)


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

XAML Values

commandBarElements

One or more object elements for classes that implement ICommandBarElement. These are typically AppBarButton, AppBarToggleButton or AppBarSeparator elements.

Property value

Type: IObservableVector<ICommandBarElement>

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

Remarks

A CommandBar can contain only AppBarButton, AppBarToggleButton, or AppBarSeparator command elements. The primary commands are shown on the left side of the CommandBar when the FlowDirection is LeftToRight, and on the right side when the FlowDirection is RightToLeft.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

CommandBar
SecondaryCommands

 

 

Show:
© 2015 Microsoft