CommandBar.PrimaryCommands property

Applies to Windows and Windows Phone

Gets the collection of primary command elements for the CommandBar.

Syntax


public:
property IObservableVector<ICommandBarElement>^ PrimaryCommands { 
   IObservableVector<ICommandBarElement>^ get();
}


<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

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:
© 2014 Microsoft