New to Telerik UI for WPFStart a free 30-day trial

Represents a navigable item in a RadNavigationView control. The RadNavigationViewItem serves as a container for navigation items, providing functionality for expanding and collapsing sub-items. It supports a variety of properties for customizing the display of icons, item templates, and item styles, as well as commands for item selection and highlighting. Additionally, it manages hierarchical relationships with support for displaying nested items and tracking selected states. Routed events for expansion and collapse allow for a responsive user interface along with built-in animations for visual transitions.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
[TelerikToolboxCategory("Navigation")]
public class RadNavigationViewItem : ButtonBase

Inheritance: objectRadNavigationViewItem

Constructors

Initializes a new instance of the RadNavigationViewItem class.

C#
public RadNavigationViewItem()

Fields

Identifies the CalculatedItemIndentation dependency property.

C#
public static readonly DependencyProperty CalculatedItemIndentationProperty

CollapsedEvent

RoutedEvent

Identifies the Collapsed routed event.

C#
public static readonly RoutedEvent CollapsedEvent

CollapsedIconProperty

DependencyProperty

Identifies the CollapsedIcon dependency property.

C#
public static readonly DependencyProperty CollapsedIconProperty

Identifies the CollapsedIconTemplate dependency property.

C#
public static readonly DependencyProperty CollapsedIconTemplateProperty

DisplayMemberPathProperty

DependencyProperty

Identifies the DisplayMemberPath dependency property.

C#
public static readonly DependencyProperty DisplayMemberPathProperty

ExpandedEvent

RoutedEvent

Identifies the Expanded routed event.

C#
public static readonly RoutedEvent ExpandedEvent

ExpandedIconProperty

DependencyProperty

Identifies the ExpandedIcon dependency property.

C#
public static readonly DependencyProperty ExpandedIconProperty

Identifies the ExpandedIconTemplate dependency property.

C#
public static readonly DependencyProperty ExpandedIconTemplateProperty

HasSelectedSubItemProperty

DependencyProperty

Identifies the HasSelectedSubItem dependency property.

C#
public static readonly DependencyProperty HasSelectedSubItemProperty

IconProperty

DependencyProperty

Identifies the Icon dependency property.

C#
public static readonly DependencyProperty IconProperty

IconTemplateProperty

DependencyProperty

Identifies the IconTemplate dependency property.

C#
public static readonly DependencyProperty IconTemplateProperty

Identifies the IconTemplateSelector dependency property.

C#
public static readonly DependencyProperty IconTemplateSelectorProperty

IconVisibilityProperty

DependencyProperty

Identifies the IconVisibility dependency property.

C#
public static readonly DependencyProperty IconVisibilityProperty

IsExpandedProperty

DependencyProperty

Identifies the IsExpanded dependency property.

C#
public static readonly DependencyProperty IsExpandedProperty

IsHighlightedProperty

DependencyProperty

Identifies the IsHighlighted dependency property.

C#
public static readonly DependencyProperty IsHighlightedProperty

IsSelectableProperty

DependencyProperty

Identifies the IsSelectable dependency property.

C#
public static readonly DependencyProperty IsSelectableProperty

IsSelectedProperty

DependencyProperty

Identifies the IsSelected dependency property.

C#
public static readonly DependencyProperty IsSelectedProperty

ItemContainerStyleProperty

DependencyProperty

Identifies the ItemContainerStyle dependency property.

C#
public static readonly DependencyProperty ItemContainerStyleProperty

ItemsSourceProperty

DependencyProperty

Identifies the ItemsSource dependency property.

C#
public static readonly DependencyProperty ItemsSourceProperty

ItemTemplateProperty

DependencyProperty

Identifies the ItemTemplate dependency property.

C#
public static readonly DependencyProperty ItemTemplateProperty

Properties

Gets the calculated indentation length for the level of the NavigationViewItem.

C#
public double CalculatedItemIndentation { get; }

Gets or sets the icon that is displayed when the RadNavigationViewItem is in collapsed state. This is a dependency property.

C#
[SRCategory("Appearance")]
public object CollapsedIcon { get; set; }

Gets or sets the data template used for icon when the RadNavigationViewItem is in collapsed state. This is a dependency property.

C#
[SRCategory("Appearance")]
public DataTemplate CollapsedIconTemplate { get; set; }

Gets or sets a path to a value on the source object to serve as the visual representation of the object.

C#
public string DisplayMemberPath { get; set; }

Gets or sets the icon that is displayed when the RadNavigationViewItem is in expanded state. This is a dependency property.

C#
[SRCategory("Appearance")]
public object ExpandedIcon { get; set; }

Gets or sets the data template used for icon when the RadNavigationViewItem is in expanded state. This is a dependency property.

C#
[SRCategory("Appearance")]
public DataTemplate ExpandedIconTemplate { get; set; }

Gets or sets a value indicating whether the RadNavigationViewItem has selected sub item on any sub level. This is a dependency property.

C#
public bool HasSelectedSubItem { get; set; }

Gets or sets the icon that appears in a RadNavigationViewItem. This is a dependency property.

C#
[SRCategory("Appearance")]
public object Icon { get; set; }

IconTemplate

DataTemplate

Gets or sets the data template used for Icon in a RadNavigationViewItem. This is a dependency property.

C#
[SRCategory("Appearance")]
public DataTemplate IconTemplate { get; set; }

IconTemplateSelector

DataTemplateSelector

Gets or sets the data template selector used for Icon in a RadNavigationViewItem. This is a dependency property.

C#
[SRCategory("Appearance")]
public DataTemplateSelector IconTemplateSelector { get; set; }

IconVisibility

Visibility

Gets or sets the visibility for the Icon in a RadNavigationViewItem. Default value is Visibility.Visible. This is a dependency property.

C#
public Visibility IconVisibility { get; set; }

Gets or sets a value indicating whether the RadNavigationViewItem is in the expanded state. This is a dependency property.

C#
public bool IsExpanded { get; set; }

Gets or sets a value indicating whether this instance is highlighted. This is a dependency property.

C#
public bool IsHighlighted { get; set; }

Gets or sets a value indicating whether this instance can be selected through the UI. Default value is true - the instance can be selected through the UI. This is a dependency property.

C#
public bool IsSelectable { get; set; }

Gets or sets a value indicating whether this instance is selected. This is a dependency property.

C#
public bool IsSelected { get; set; }

Gets value that indicates the RadNavigationViewItem is top level.

C#
public bool IsTopLevel { get; }

Gets or sets the System.Windows.Style that is applied to the container element generated for each sub item. This is a dependency property.

C#
public Style ItemContainerStyle { get; set; }

Gets the sub items of the RadNavigationViewItem.

C#
public IList Items { get; }

Gets or sets a collection used to generate the sub items of a RadNavigationViewItem. This is a dependency property.

C#
public IEnumerable ItemsSource { get; set; }

ItemTemplate

DataTemplate

Gets or sets the System.Windows.DataTemplate used to display each sub item. This is a dependency property.

C#
public DataTemplate ItemTemplate { get; set; }

Methods

Creates or identifies the element that is used to display the given item.

C#
protected virtual DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

Determines if the specified item is (or is eligible to be) its own container.

C#
protected virtual bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobject

The item to check.

Returns:

bool

True if the item is (or is eligible to be) its own container; otherwise, false.

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

C#
public override void OnApplyTemplate()

Raises the routed event.

C#
protected override void OnClick()

Returns class-specific AutomationPeer.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

The type-specific AutomationPeer implementation.

Called before the event occurs.

C#
protected override void OnGotFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Invoked when the IsExpanded property changes.

C#
protected virtual void OnIsExpandedChanged()

Called when selection is changed.

C#
protected virtual void OnIsSelectedChanged()

Called before the event occurs.

C#
protected override void OnLostFocus(RoutedEventArgs e)
Parameters:eRoutedEventArgs

The data for the event.

Responds to a MouseEnter event.

C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs instance containing the event data.

Responds to a MouseLeave event.

C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs instance containing the event data.

Responds to a MouseMove event.

C#
protected override void OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

The MouseEventArgs instance containing the event data.

Responds to a MouseWheel event.

C#
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters:eMouseWheelEventArgs

The MouseWheelEventArgs instance containing the event data.

Prepares the specified element to display the specified item.

C#
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Resets the theme.

C#
public void ResetTheme()

Events

Collapsed

RoutedEventHandler

Occurs when the RadNavigationViewItem gets collapsed.

C#
public event RoutedEventHandler Collapsed

Expanded

RoutedEventHandler

Occurs when the RadNavigationViewItem gets expanded.

C#
public event RoutedEventHandler Expanded