Pinning the App Bar

Here’s what’s going into the nightly build. I’ve simplified the navigation bar configurations.

On UDPage, you can now specify how you’d like the navigation bar to be shown. You can also specify a list if you wish to customize the navigation bar items. If you don’t specify the navigation parameter, it will just use the list of pages.

$Navigation = @(
    New-UDListItem -Label "Home"
    New-UDListItem -Label "Getting Started" -Children {
        New-UDListItem -Label "Installation" -OnClick {}
        New-UDListItem -Label "Usage" -OnClick {}
        New-UDListItem -Label "FAQs" -OnClick {}
        New-UDListItem -Label "System Requirements" -OnClick {}
        New-UDListItem -Label "Purchasing" -OnClick {}
    }
)

$Pages = @()
$Pages += New-UDPage -Name 'Test' -Content {
 New-UDTypography -Text "Hello"
} -NavigationLayout permanent -Navigation $Navigation

$Pages += New-UDPage -Name 'Test2' -Content {
    New-UDTypography -Text "Hello"
} -NavigationLayout permanent -Navigation $Navigation


New-UDDashboard -Title "Hello, World!" -Pages $Pages

Here is the result

image

If I don’t specify the navigation, it looks like this.

image

1 Like