Skip to content

NavigationViewItem class

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

Defined in

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

Summary

Represents the container for an item in a NavigationView control. When needed, it can be used as a normal button with a Click action.

Applies to

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

Class hierarchy
classDiagram
class NavigationViewItem
class ButtonBase
ButtonBase <|-- NavigationViewItem
class INavigationViewItem {
    <>
}
INavigationViewItem <|.. NavigationViewItem
class IIconControl {
    <>
}
IIconControl <|.. NavigationViewItem
class IDisposable {
    <>
}
IDisposable <|.. NavigationViewItem

Inherits from: ButtonBase

Implements: INavigationViewItem, IIconControl, IDisposable

Constructors

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

Properties

NameSummary
MenuItemsGets the menu items.
MenuItemsSourceGets or sets a source for menu items.
HasMenuItemsGets a value indicating whether this item has menu items.
IsActiveGets or sets a value indicating whether this item is active.
IsExpandedGets or sets a value indicating whether this item is expanded.
IsPaneOpenGets or sets a value indicating whether the parent pane is open.
IconGets or sets the icon.
TargetPageTagGets or sets the target page tag.
TargetPageTypeGets or sets the target page type.
TargetViewModelTypeGets or sets the target ViewModel type (ViewModel-first navigation). When set it overrides page navigation.
TargetHostNameGets or sets the target host name for ViewModel-first navigation. Empty uses default host.
NavigationViewItemParentGets or sets the parent navigation view item.
IsMenuElementGets or sets a value indicating whether this item is a menu element.
IdGets the identifier.
InfoBadgeGets or sets an info badge.
NavigationCacheModeGets or sets the navigation cache mode.

Fields

NameSummary
static MenuItemsPropertyIdentifies the [MenuItems](# dependency property.
static MenuItemsSourcePropertyProperty for [MenuItemsSource](#
static HasMenuItemsPropertyIdentifies the [HasMenuItems](# dependency property.
static IsActivePropertyProperty for [IsActive](#
static IsPaneOpenPropertyProperty for [IsPaneOpen](#
static IsExpandedPropertyProperty for [IsExpanded](#
static IconPropertyProperty for [Icon](#
static TargetPageTagPropertyProperty for [TargetPageTag](#
static TargetPageTypePropertyProperty for [TargetPageType](#
static InfoBadgePropertyProperty for [InfoBadge](#
static NavigationCacheModePropertyProperty for [NavigationCacheMode](#
static TargetViewModelTypePropertyTarget ViewModel type (ViewModel-first navigation).
static TargetHostNamePropertyTarget host name for ViewModel-first navigation.
static TemplateElementChevronGridThe template element chevron grid.
ChevronGridThe chevron grid element from template.

Methods

NameSummary
ActivateActivates this item.
DeactivateDeactivates this item.
OnApplyTemplate
DisposePerforms application-defined tasks associated with freeing resources.
OnInitializedCalled when the control is initialized.
OnClickClick handler.
OnMouseDownMouse down logic to manage expansion region.
Inherited members