Skip to content

NavigationView class

Attributes: [ToolboxItem(true)] [ToolboxBitmap] [TemplatePart] [TemplatePart] [TemplatePart] [TemplatePart] [TemplatePart] [TemplatePart]

Defined in

Namespace: CrissCross.WPF.UI.Controls Assembly: CrissCross.WPF.UI.dll Full name: CrissCross.WPF.UI.Controls.NavigationView Modifiers: public

Summary

Partial ViewModel-first integration for NavigationView. Enables automatic activation/highlighting of items when ViewModel-based navigation occurs via CrissCross navigation hosts.

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

Class hierarchy
classDiagram
class NavigationView
class Control
Control <|-- NavigationView
class INavigationView {
    <>
}
INavigationView <|.. NavigationView
class IUseHostedNavigation {
    <>
}
IUseHostedNavigation <|.. NavigationView
class IDisposable {
    <>
}
IDisposable <|.. NavigationView

Inherits from: Control

Implements: INavigationView, IUseHostedNavigation, IDisposable

Constructors

NameSummary
.ctorInitializes a new instance of the [NavigationView](# class.

Properties

NameSummary
SelectedItemGets the selected item.
CanGoBackGets a value indicating whether gets a value that indicates whether there is at least one entry in back navigation history.
CanGoForwardGets a value indicating whether there is at least one entry in forward navigation history.
EnableDebugMessagesGets or sets a value indicating whether enables or disables debugging messages for this control.
HeaderGets or sets the header content.
HeaderVisibilityGets or sets the [Header](# visibility.
AlwaysShowHeaderGets or sets a value indicating whether gets or sets a value that indicates whether the header is always visible.
MenuItemsGets the collection of menu items displayed in the NavigationView.
MenuItemsSourceGets or sets an object source used to generate the content of the NavigationView menu.
FooterMenuItemsGets the list of objects to be used as navigation items in the footer menu.
FooterMenuItemsSourceGets or sets the object that represents the navigation items to be used in the footer menu.
ContentOverlayGets or sets a UI element that is shown at the top of the control, below the pane if PaneDisplayMode is Top.
IsBackEnabledGets a value indicating whether gets a value that indicates whether the back button is enabled or disabled.
IsBackButtonVisibleGets 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...
IsPaneToggleVisibleGets or sets a value indicating whether gets or sets a value that indicates whether the toggle button is visible.
IsPaneOpenGets or sets a value indicating whether gets or sets a value that specifies whether the NavigationView pane is expanded to its full width.
IsPaneVisibleGets or sets a value indicating whether gets or sets a value that determines whether the pane is shown.
OpenPaneLengthGets or sets the width of the NavigationView pane when it's fully expanded.
CompactPaneLengthGets or sets the width of the NavigationView pane in its compact display mode.
PaneHeaderGets or sets the content for the pane header.
PaneTitleGets or sets the label adjacent to the menu icon when the NavigationView pane is open.
PaneFooterGets or sets the content for the pane footer.
PaneDisplayModeGets or sets a value that specifies how the pane and content areas of a NavigationView are being shown.
AutoSuggestBoxGets or sets an AutoSuggestBox to be displayed in the NavigationView.
TitleBarGets or sets an TitleBar to be displayed in the NavigationView.
BreadcrumbBarGets or sets an BreadcrumbBar that is in [Header](#
ItemTemplateGets or sets template Property for [MenuItems](# and [FooterMenuItems](#
TransitionDurationGets or sets a value deciding how long the effect of the transition between the pages should take.
TransitionGets or sets type of [INavigationView](# transitions during navigation.
FrameMarginGets or sets margin for a Frame of [INavigationView](#

Fields

NameSummary
static HeaderContentPropertyThe header content property.
static PaneOpenedEventProperty for [PaneOpened](#
static PaneClosedEventProperty for [PaneClosed](#
static SelectionChangedEventProperty for [SelectionChanged](#
static ItemInvokedEventProperty for [ItemInvoked](#
static BackRequestedEventProperty for [BackRequested](#
static NavigatingEventProperty for [Navigating](#
static NavigatedEventProperty for [NavigatedEvent](#
static EnableDebugMessagesPropertyProperty for [Header](#
static HeaderPropertyProperty for [Header](#
static HeaderVisibilityPropertyProperty for [HeaderVisibility](#
static AlwaysShowHeaderPropertyProperty for [AlwaysShowHeader](#
static MenuItemsPropertyIdentifies the [MenuItems](# dependency property.
static FooterMenuItemsPropertyIdentifies the [FooterMenuItems](# dependency property.
static MenuItemsSourcePropertyProperty for [MenuItemsSource](#
static FooterMenuItemsSourcePropertyProperty for [FooterMenuItemsSource](#
static ContentOverlayPropertyProperty for [ContentOverlay](#
static IsBackEnabledPropertyProperty for [IsBackEnabled](#
static IsBackButtonVisiblePropertyProperty for [IsBackButtonVisible](#
static IsPaneToggleVisiblePropertyProperty for [IsPaneToggleVisible](#
static IsPaneOpenPropertyProperty for [IsPaneOpen](#
static IsPaneVisiblePropertyProperty for [IsPaneVisible](#
static OpenPaneLengthPropertyProperty for [OpenPaneLength](#
static CompactPaneLengthPropertyProperty for [CompactPaneLength](#
static PaneHeaderPropertyProperty for [PaneHeader](#
static PaneTitlePropertyProperty for [PaneTitle](#
static PaneFooterPropertyProperty for [PaneFooter](#
static PaneDisplayModePropertyProperty for [PaneDisplayMode](#
static AutoSuggestBoxPropertyProperty for [AutoSuggestBox](#
static TitleBarPropertyProperty for [TitleBar](#
static BreadcrumbBarPropertyProperty for [BreadcrumbBar](#
static ItemTemplatePropertyProperty for [ItemTemplate](#
static TransitionDurationPropertyProperty for [TransitionDuration](#
static TransitionPropertyProperty for [Transition](#
static FrameMarginPropertyProperty for [FrameMargin](#
NavigationViewContentPresenterControl responsible for rendering the content.
MenuItemsItemsControlControl located at the top of the pane with left arrow icon.
FooterMenuItemsItemsControlControl located at the top of the pane with hamburger icon.
BackButtonControl located at the top of the pane with left arrow icon.
ToggleButtonControl located at the top of the pane with hamburger icon.
AutoSuggestBoxSymbolButtonControl that is visitable if PaneDisplayMode="Left" and in compact state.

Methods

NameSummary
static GetHeaderContentGets the content of the header.
static SetHeaderContentSets the content of the header.
static UpdateVisualStateUpdates the state of the visual.
OnInitialized
OnUnloadedThis virtual method is called when this element is detached form a loaded tree.
OnMouseDownInvoked when an unhandled MouseDown�attached event reaches an element in its route that is derived from this class....
OnSizeChangedThis virtual method is called when ActualWidth or ActualHeight (or both) changed.
OnBackButtonClickThis virtual method is called when [BackButton](# is clicked.
OnToggleButtonClickThis virtual method is called when [ToggleButton](# is clicked.
AutoSuggestBoxSymbolButtonOnClickThis virtual method is called when [AutoSuggestBoxSymbolButton](# is clicked.
OnPaneDisplayModeChangedThis virtual method is called when [PaneDisplayMode](# is changed.
OnItemTemplateChangedThis virtual method is called when [ItemTemplate](# is changed.
BreadcrumbBarOnItemClickedBreadcrumbs the bar on item clicked.
AddItemsToDictionariesAdds the items to dictionaries.
AddItemsToAutoSuggestBoxItemsAdds the items to automatic suggest box items.
NavigateToMenuItemFromAutoSuggestBoxNavigates to menu item from automatic suggest box.
UpdateMenuItemsTemplateUpdates the menu items template.
CloseNavigationViewItemMenusCloses the navigation view item menus.
DeactivateMenuItemsDeactivates the menu items.
OnPaneOpenedRaises the pane opened event.
OnPaneClosedRaises the pane closed event.
OnSelectionChangedRaises the selection changed event.
OnItemInvokedRaises the item invoked event.
OnBackRequestedRaises the back requested event.
OnNavigatingRaises the navigating requested event.
OnNavigatedRaises the navigated requested event.
SetPageServiceAllows you to assign to the NavigationView a special service responsible for retrieving the page instances.
SetServiceProviderAllows you to assign a general IServiceProvider to the NavigationView that will be used to retrieve page instances and view models.
NavigateSynchronously navigates current navigation Frame to the given Element.
NavigateWithHierarchySynchronously adds an element to the navigation stack and navigates current navigation Frame to the.
ReplaceContentReplaces the contents of the navigation frame, without changing the currently selected item or triggering an [SelectionChanged](#
GoForwardNavigates the NavigationView to the next journal entry.
GoBackNavigates the NavigationView to the previous journal entry.
ClearJournalClears the NavigationView history.
OnApplyTemplate
GetTemplateChildGets the template child.
DisposeDisposes resources.

Events

NameSummary
PaneOpenedOccurs when the NavigationView pane is opened.
PaneClosedOccurs when the NavigationView pane is closed.
SelectionChangedOccurs when the currently selected item changes.
ItemInvokedOccurs when an item in the menu receives an interaction such as a click or tap.
BackRequestedOccurs when the back button receives an interaction such as a click or tap.
NavigatingOccurs when a new navigation is requested
NavigatedOccurs when navigated to page
Inherited members

See also