NavigationView / NavigationViewItem

April 9, 2026 · View on GitHub

A navigation control that displays a tree of items. Supports three positions (Left, Top, Bottom), compact/overlay/inline display modes, nested items, back button, animated content transitions, and automatic responsive collapse based on window width.

Basic usage

<NavigationView Position="Left">
    <NavigationViewItem Header="Home"
                        Icon="{DynamicResource HomeRegular}"
                        Title="Home"
                        Content="{x:Type views:HomeView}" />

    <NavigationViewItem Header="Settings"
                        Icon="{DynamicResource TuneRegular}"
                        Title="Settings"
                        Content="{x:Type views:SettingsView}" />
</NavigationView>

The Content of the selected item is displayed in the main content area. Title is shown in the content panel header.

PropertyTypeDefaultDescription
PositionNavigationViewPositionLeftPosition of the navigation pane: Left, Top, or Bottom
TopItemsAvaloniaList<NavigationViewItem>Items displayed in the top navigation bar (use when Position=Top)
BottomItemsAvaloniaList<NavigationViewItem>Items displayed in the bottom navigation bar (use when Position=Bottom)
IsOpenboolfalseWhether the pane is expanded
AlwaysOpenboolfalseKeeps the pane always expanded
DisplayModeSplitViewDisplayModeCompactInlineCompactInline, CompactOverlay, Inline, Overlay
DynamicDisplayModebooltrueAuto-switches to compact/overlay at narrow widths (Left position only)
CompactPaneLengthdouble50Width of the pane in compact mode
OpenPaneLengthdouble250Width of the pane when open
IsFloatingHeaderboolfalseFloats the header above the pane
ShowBackButtonboolfalseShows a back button at the top
BackButtonCommandICommand?nullCommand invoked by the back button
ButtonsPanelOffsetboolfalsePushes hamburger/back buttons down by titlebar height to sit flush below titlebar
DisplayTopIndentbooltrueWhether the top indent is displayed
NotMakeOffsetForContentPanelboolfalseWhether the content panel should not have an offset
BindWindowSettingsbooltrueWhether window settings should be bound
TransitionAnimationAnimation?slide-upAnimation played when selected content changes
SelectedContentobject?Currently displayed content (read-only)
SelectedContentTemplateIDataTemplateData template for selected content
ItemsAsStringsIEnumerable<string>?Items collection as strings (read-only)
PropertyTypeDescription
HeaderstringLabel shown in the pane
IconGeometry?Icon shown in compact mode and next to the label
TitleobjectHeading shown in the content area when this item is selected
Contentobject?Content displayed in the main area when selected
IsOpenboolWhether child items are expanded

Position

The Position property controls where the navigation pane is displayed:

  • Left (default) - Side pane with SplitView layout
  • Top - Horizontal bar above the content area
  • Bottom - Horizontal bar below the content area
<!-- Top navigation bar -->
<NavigationView Position="Top">
    <!-- Items are populated from the Items collection -->
</NavigationView>

<!-- Bottom navigation bar -->
<NavigationView Position="Bottom">
    <!-- Items are populated from the Items collection -->
</NavigationView>

Top/Bottom navigation items

When using Position="Top" or Position="Bottom", items are automatically populated from the main Items collection. The control creates proxy items internally to avoid visual tree conflicts.

For the Left position, use the standard Items collection. For Top/Bottom positions, you can also use the dedicated TopItems and BottomItems collections directly:

<NavigationView Position="Top">
    <NavigationView.TopItems>
        <NavigationViewItem Header="Home" Icon="{DynamicResource HomeRegular}" Content="{x:Type views:HomeView}" />
        <NavigationViewItem Header="Search" Icon="{DynamicResource SearchRegular}" Content="{x:Type views:SearchView}" />
    </NavigationView.TopItems>
</NavigationView>

<NavigationView Position="Bottom">
    <NavigationView.BottomItems>
        <NavigationViewItem Header="Home" Icon="{DynamicResource HomeRegular}" Content="{x:Type views:HomeView}" />
        <NavigationViewItem Header="Profile" Icon="{DynamicResource PersonRegular}" Content="{x:Type views:ProfileView}" />
    </NavigationView.BottomItems>
</NavigationView>

Nested items

Nested items are supported in the Left position:

<NavigationView Position="Left">
    <NavigationViewItem Header="Library" Icon="{DynamicResource FolderRegular}">
        <NavigationViewItem Header="Music"   Content="{x:Type views:MusicView}" />
        <NavigationViewItem Header="Videos"  Content="{x:Type views:VideosView}" />
        <NavigationViewItem Header="Photos"  Content="{x:Type views:PhotosView}" />
    </NavigationViewItem>
</NavigationView>

Note: Nested items are not supported in Top/Bottom positions.

Buttons panel offset

The ButtonsPanelOffset property controls whether the hamburger/back buttons panel is pushed down by the titlebar height:

<!-- Buttons sit flush below the titlebar -->
<NavigationView ButtonsPanelOffset="True" />

<!-- Buttons overlap the titlebar (original behavior) -->
<NavigationView ButtonsPanelOffset="False" />

This property is automatically synced with the window's TitleBarType - when set to Compact, ButtonsPanelOffset is set to true.

Display top indent

Control whether the top indent is displayed:

<NavigationView DisplayTopIndent="False" />

Content panel offset

Control whether the content panel has an offset:

<NavigationView NotMakeOffsetForContentPanel="True" />

Responding to selection in code

navigationView.SelectionChanged += (_, e) =>
{
    if (e.SelectedItem is NavigationViewItem item)
        Console.WriteLine(item.Header);
};