Search code examples
winui-3navigationview

How to add a new page next to Settings in Template Studio for WinUI


I want to have a few pages at the bottom of navigation pane but I can not find in code where the Settings navigation is added. Do you have any advice?

canNotTrackSettingsNavigationElement

There is a documentation for NavigationView

https://learn.microsoft.com/pl-pl/windows/apps/design/controls/navigationview

Look for "Footer menu items"


Solution

  • You can add Footer menu items.

    <NavigationView>
        <NavigationView.MenuItems>
            <NavigationViewItem Content="Menu item 1" />
            <NavigationViewItem Content="Menu item 2" />
        </NavigationView.MenuItems>
        <NavigationView.FooterMenuItems>
            <NavigationViewItem Content="Footer menu item 1" />
            <NavigationViewItem Content="Footer menu item 2" />
        </NavigationView.FooterMenuItems>
    </NavigationView>
    

    By the way, you can also add items to Pane footer but they are not included in the selection process, so you can click them but they won't change the selection.