NavigationViewItem
- Assembly:
Fluence.Wpf - Namespace:
Fluence.Wpf.Controls
public class NavigationViewItem : ListBoxItem
Represents an entry inside a NavigationView pane.
Remarks: Inspired by WinUI3's NavigationView.
Base type: ListBoxItem
Constructors
NavigationViewItem
public NavigationViewItem()
Creates a new NavigationViewItem instance.
Properties
Icon
public object Icon { get; set; }
Gets or sets the icon content for this item (typically a FontIcon).
InfoBadge
public object InfoBadge { get; set; }
Gets or sets an InfoBadge element shown on this item.
IsChildItem
public bool IsChildItem { get; set; }
Gets or sets whether this item is a child entry in an expanded navigation section. Child entries keep their selection indicator aligned with the content column.
IsPressed
public bool IsPressed { get; }
Gets whether the item is currently being pressed by a pointer.
Methods
OnCreateAutomationPeer
protected override AutomationPeer OnCreateAutomationPeer()
Documentation inherited from the ListBoxItem API.
OnKeyDown
protected override void OnKeyDown(KeyEventArgs e)
Documentation inherited from the ListBoxItem API.
OnMouseLeave
protected override void OnMouseLeave(MouseEventArgs e)
Documentation inherited from the ListBoxItem API.
OnMouseLeftButtonDown
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Documentation inherited from the ListBoxItem API.
OnMouseLeftButtonUp
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Documentation inherited from the ListBoxItem API.
OnPreviewMouseLeftButtonDown
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Documentation inherited from the ListBoxItem API.
Remarks: Parent NavigationView derives from Selector (not ListBox). ListBoxItem handles mouse on the bubbling route and may mark the event handled before selection sync runs; we handle preview mouse and sync selection on the parent so clicks always update selection.
OnPropertyChanged
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Documentation inherited from the ListBoxItem API.
Remarks: Evicts the parent NavigationView's cached Top-overflow natural width when a measure-affecting property changes while a width is cached. An item sitting collapsed in the overflow menu is never measured, so it never raises the SizeChanged that is the ordinary eviction path; a content or font change while overflowed would otherwise keep the stale width forever. VisibilityProperty is excluded because the overflow pass itself toggles it, and that toggle carries no width change.
Dependency property identifiers
Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.
IconProperty
public static readonly DependencyProperty IconProperty
Identifies the Icon dependency property.
InfoBadgeProperty
public static readonly DependencyProperty InfoBadgeProperty
Identifies the InfoBadge dependency property.
IsChildItemProperty
public static readonly DependencyProperty IsChildItemProperty
Identifies the IsChildItem dependency property.
IsPressedProperty
public static readonly DependencyProperty IsPressedProperty
Identifies the read-only IsPressed dependency property.