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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [NavigationViewItem](# class. |
Properties¶
| Name | Summary |
|---|---|
| MenuItems | Gets the menu items. |
| MenuItemsSource | Gets or sets a source for menu items. |
| HasMenuItems | Gets a value indicating whether this item has menu items. |
| IsActive | Gets or sets a value indicating whether this item is active. |
| IsExpanded | Gets or sets a value indicating whether this item is expanded. |
| IsPaneOpen | Gets or sets a value indicating whether the parent pane is open. |
| Icon | Gets or sets the icon. |
| TargetPageTag | Gets or sets the target page tag. |
| TargetPageType | Gets or sets the target page type. |
| TargetViewModelType | Gets or sets the target ViewModel type (ViewModel-first navigation). When set it overrides page navigation. |
| TargetHostName | Gets or sets the target host name for ViewModel-first navigation. Empty uses default host. |
| NavigationViewItemParent | Gets or sets the parent navigation view item. |
| IsMenuElement | Gets or sets a value indicating whether this item is a menu element. |
| Id | Gets the identifier. |
| InfoBadge | Gets or sets an info badge. |
| NavigationCacheMode | Gets or sets the navigation cache mode. |
Fields¶
| Name | Summary |
|---|---|
| static MenuItemsProperty | Identifies the [MenuItems](# dependency property. |
| static MenuItemsSourceProperty | Property for [MenuItemsSource](# |
| static HasMenuItemsProperty | Identifies the [HasMenuItems](# dependency property. |
| static IsActiveProperty | Property for [IsActive](# |
| static IsPaneOpenProperty | Property for [IsPaneOpen](# |
| static IsExpandedProperty | Property for [IsExpanded](# |
| static IconProperty | Property for [Icon](# |
| static TargetPageTagProperty | Property for [TargetPageTag](# |
| static TargetPageTypeProperty | Property for [TargetPageType](# |
| static InfoBadgeProperty | Property for [InfoBadge](# |
| static NavigationCacheModeProperty | Property for [NavigationCacheMode](# |
| static TargetViewModelTypeProperty | Target ViewModel type (ViewModel-first navigation). |
| static TargetHostNameProperty | Target host name for ViewModel-first navigation. |
| static TemplateElementChevronGrid | The template element chevron grid. |
| ChevronGrid | The chevron grid element from template. |
Methods¶
| Name | Summary |
|---|---|
| Activate | Activates this item. |
| Deactivate | Deactivates this item. |
| OnApplyTemplate | |
| Dispose | Performs application-defined tasks associated with freeing resources. |
| OnInitialized | Called when the control is initialized. |
| OnClick | Click handler. |
| OnMouseDown | Mouse down logic to manage expansion region. |