Interface INavigationView
Represents a container that enables navigation of app content. It has a header, a view for the main content, and a menu pane for navigation commands.
public interface INavigationView
Properties
AlwaysShowHeader
Gets or sets a value indicating whether the header is always visible.
bool AlwaysShowHeader { get; set; }
Property Value
AutoSuggestBox
Gets or sets an AutoSuggestBox to be displayed in the NavigationView.
AutoSuggestBox? AutoSuggestBox { get; set; }
Property Value
BreadcrumbBar
Gets or sets an BreadcrumbBar that is in Header.
BreadcrumbBar? BreadcrumbBar { get; set; }
Property Value
CanGoBack
Gets a value indicating whether there is at least one entry in back navigation history.
bool CanGoBack { get; }
Property Value
CompactPaneLength
Gets or sets the width of the NavigationView pane in its compact display mode.
double CompactPaneLength { get; set; }
Property Value
ContentOverlay
Gets or sets a UI element that is shown at the top of the control, below the pane if PaneDisplayMode is Top.
object? ContentOverlay { get; set; }
Property Value
FooterMenuItems
Gets the list of objects to be used as navigation items in the footer menu.
IList FooterMenuItems { get; }
Property Value
FooterMenuItemsSource
Gets or sets the object that represents the navigation items to be used in the footer menu.
object? FooterMenuItemsSource { get; set; }
Property Value
FrameMargin
Gets or sets margin for a Frame of INavigationView
Thickness FrameMargin { get; set; }
Property Value
Header
Gets or sets the header content.
object? Header { get; set; }
Property Value
HeaderVisibility
Gets or sets the Header visibility.
Visibility HeaderVisibility { get; set; }
Property Value
IsBackButtonVisible
Gets or sets a value that indicates whether the back button is visible or not. Default value is "Auto", which indicates that button visibility depends on the DisplayMode setting of the NavigationView.
NavigationViewBackButtonVisible IsBackButtonVisible { get; set; }
Property Value
IsBackEnabled
Gets a value indicating whether the back button is enabled or disabled.
bool IsBackEnabled { get; }
Property Value
IsPaneOpen
Gets or sets a value indicating whether the NavigationView pane is expanded to its full width.
bool IsPaneOpen { get; set; }
Property Value
IsPaneToggleVisible
Gets or sets a value indicating whether the toggle button is visible.
bool IsPaneToggleVisible { get; set; }
Property Value
IsPaneVisible
Gets or sets a value indicating whether the pane is shown.
bool IsPaneVisible { get; set; }
Property Value
ItemTemplate
Gets or sets the template property for MenuItems and FooterMenuItems.
ControlTemplate? ItemTemplate { get; set; }
Property Value
MenuItems
Gets the collection of menu items displayed in the NavigationView.
IList MenuItems { get; }
Property Value
MenuItemsSource
Gets or sets an object source used to generate the content of the NavigationView menu.
object? MenuItemsSource { get; set; }
Property Value
OpenPaneLength
Gets or sets the width of the NavigationView pane when it's fully expanded.
double OpenPaneLength { get; set; }
Property Value
PaneDisplayMode
Gets or sets a value that specifies how the pane and content areas of a NavigationView are being shown.
It is not the same PaneDisplayMode as in WinUi.
NavigationViewPaneDisplayMode PaneDisplayMode { get; set; }
Property Value
PaneFooter
Gets or sets the content for the pane footer.
object? PaneFooter { get; set; }
Property Value
PaneHeader
Gets or sets the content for the pane header.
object? PaneHeader { get; set; }
Property Value
PaneTitle
Gets or sets the label adjacent to the menu icon when the NavigationView pane is open.
string? PaneTitle { get; set; }
Property Value
SelectedItem
Gets the selected item.
INavigationViewItem? SelectedItem { get; }
Property Value
TitleBar
Gets or sets an TitleBar to be displayed in the NavigationView.
TitleBar? TitleBar { get; set; }
Property Value
Transition
Gets or sets type of INavigationView transitions during navigation.
Transition Transition { get; set; }
Property Value
TransitionDuration
Gets or sets a value deciding how long the effect of the transition between the pages should take.
int TransitionDuration { get; set; }
Property Value
Methods
ClearJournal()
Clears the NavigationView history.
void ClearJournal()
GoBack()
Navigates the NavigationView to the previous journal entry.
bool GoBack()
Returns
GoForward()
Navigates the NavigationView to the next journal entry.
bool GoForward()
Returns
Navigate(string, object?)
Synchronously navigates current navigation Frame to the given Element.
bool Navigate(string pageIdOrTargetTag, object? dataContext = null)
Parameters
Returns
Navigate(Type, object?)
Synchronously navigates current navigation Frame to the given Element.
bool Navigate(Type pageType, object? dataContext = null)
Parameters
Returns
NavigateWithHierarchy(Type, object?)
Synchronously adds an element to the navigation stack and navigates current navigation Frame to the
bool NavigateWithHierarchy(Type pageType, object? dataContext = null)
Parameters
Returns
ReplaceContent(Type)
Replaces the contents of the navigation frame, without changing the currently selected item or triggering an SelectionChanged.
bool ReplaceContent(Type pageTypeToEmbed)
Parameters
pageTypeToEmbed
Type
Returns
ReplaceContent(UIElement, object?)
Replaces the contents of the navigation frame, without changing the currently selected item or triggering an SelectionChanged.
bool ReplaceContent(UIElement pageInstanceToEmbed, object? dataContext = null)
Parameters
Returns
SetPageProviderService(INavigationViewPageProvider)
Allows you to assign to the NavigationView a special service responsible for retrieving the page instances.
void SetPageProviderService(INavigationViewPageProvider navigationViewPageProvider)
Parameters
navigationViewPageProvider
INavigationViewPageProvider
SetServiceProvider(IServiceProvider)
Allows you to assign a general IServiceProvider to the NavigationView that will be used to retrieve page instances and view models.
void SetServiceProvider(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProvider
Events
BackRequested
Occurs when the back button receives an interaction such as a click or tap.
event TypedEventHandler<NavigationView, RoutedEventArgs> BackRequested
Event Type
ItemInvoked
Occurs when an item in the menu receives an interaction such as a click or tap.
event TypedEventHandler<NavigationView, RoutedEventArgs> ItemInvoked
Event Type
Navigated
Occurs when navigated to page
event TypedEventHandler<NavigationView, NavigatedEventArgs> Navigated
Event Type
Navigating
Occurs when a new navigation is requested
event TypedEventHandler<NavigationView, NavigatingCancelEventArgs> Navigating
Event Type
PaneClosed
Occurs when the NavigationView pane is closed.
event TypedEventHandler<NavigationView, RoutedEventArgs> PaneClosed
Event Type
PaneOpened
Occurs when the NavigationView pane is opened.
event TypedEventHandler<NavigationView, RoutedEventArgs> PaneOpened
Event Type
SelectionChanged
Occurs when the currently selected item changes.
event TypedEventHandler<NavigationView, RoutedEventArgs> SelectionChanged