UWP - Centralize the Command Bar Menu in the page

The Command Bar Menu is located on the left side of the page by default. But I need to move it to the central location in the page. To do so, I have to modify the style XML of Command Bar.
 Under "<Style TargetType="CommandBar">...." , located this line "<ItemsControl
    x:Name="PrimaryItemsControl"
" and then change it as below:


<ItemsControl
    x:Name="PrimaryItemsControl"
    HorizontalAlignment="Center"
    MinHeight="60"
     IsTabStop="False"
     Grid.ColumnSpan="2">

Afterwards, you can see the Command Bar Menu is located on the central of the page.

Comments

Popular posts from this blog

Top JavaScript courses helping you develop SPFx webPart with ReactJS and AngularJS

SharePoint 2013 error - "Application error when access /_vti_bin/client.svc"

Enable the Microsoft Power BI report file type (.pbix) in SharePoint Search