Skip to content

NavigationView class

Defined in

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

Summary

        NavigationView provides a collapsible navigation menu for top-level navigation.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Class hierarchy
classDiagram
class NavigationView
class TemplatedControl
TemplatedControl <|-- NavigationView
class INavigationView {
    <>
}
INavigationView <|.. NavigationView

Inherits from: TemplatedControl

Implements: INavigationView

Constructors

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

Properties

NameSummary
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.
HeaderGets or sets the header content.
HeaderVisibilityGets or sets a value indicating whether the [Header](# is visible.
AlwaysShowHeaderGets or sets a value indicating whether gets or sets a value that indicates whether the header is always visible.
ContentGets or sets the main content.
ContentOverlayGets or sets a UI element that is shown at the top of the control, below the pane if PaneDisplayMode is Top.
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.
IsPaneToggleVisibleGets or sets a value indicating whether gets or sets a value that indicates whether the toggle button is visible.
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...
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.
TitleBarGets or sets an TitleBar to be displayed in the NavigationView.
AutoSuggestBoxGets or sets an AutoSuggestBox 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](#
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.

Fields

NameSummary
static MenuItemsPropertyProperty for [MenuItems](#
static MenuItemsSourcePropertyProperty for [MenuItemsSource](#
static FooterMenuItemsPropertyProperty for [FooterMenuItems](#
static FooterMenuItemsSourcePropertyProperty for [FooterMenuItemsSource](#
static HeaderPropertyProperty for [Header](#
static HeaderVisibilityPropertyProperty for [HeaderVisibility](#
static AlwaysShowHeaderPropertyProperty for [AlwaysShowHeader](#
static ContentPropertyProperty for [Content](#
static ContentOverlayPropertyProperty for [ContentOverlay](#
static IsPaneOpenPropertyProperty for [IsPaneOpen](#
static IsPaneVisiblePropertyProperty for [IsPaneVisible](#
static IsPaneToggleVisiblePropertyProperty for [IsPaneToggleVisible](#
static IsBackEnabledPropertyProperty for [IsBackEnabled](#
static IsBackButtonVisiblePropertyProperty for [IsBackButtonVisible](#
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 TitleBarPropertyProperty for [TitleBar](#
static AutoSuggestBoxPropertyProperty for [AutoSuggestBox](#
static BreadcrumbBarPropertyProperty for [BreadcrumbBar](#
static ItemTemplatePropertyProperty for [ItemTemplate](#
static TransitionDurationPropertyProperty for [TransitionDuration](#
static TransitionPropertyProperty for [Transition](#
static FrameMarginPropertyProperty for [FrameMargin](#
static PaneOpenedEventRouted event for [PaneOpened](#
static PaneClosedEventRouted event for [PaneClosed](#
static SelectionChangedEventRouted event for [SelectionChanged](#
static ItemInvokedEventRouted event for [ItemInvoked](#
static BackRequestedEventRouted event for [BackRequested](#
static NavigatingEventRouted event for [Navigating](#
static NavigatedEventRouted event for [Navigated](#
static TemplateElementNavigationViewContentPresenterThe template element navigation view content presenter.
static TemplateElementMenuItemsItemsControlThe template element menu items items control.
static TemplateElementFooterMenuItemsItemsControlThe template element footer menu items items control.
static TemplateElementBackButtonThe template element back button.
static TemplateElementToggleButtonThe template element toggle button.
static TemplateElementAutoSuggestBoxSymbolButtonThe template element auto suggest box symbol button.

Methods

NameSummary
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.
OnApplyTemplateCalled when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
OnBackButtonClickCalled when back button is clicked.
OnToggleButtonClickCalled when toggle button is clicked.
OnIsPaneOpenChangedCalled when IsPaneOpen changes.
AddItemsToDictionariesAdds items to dictionaries.

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