Class
RadNavigationViewItem

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:

cs-api-definition
[TelerikToolboxCategory("Navigation")]
public class RadNavigationViewItem : ButtonBase

Inheritance: objectRadNavigationViewItem

Constructors

RadNavigationViewItem()

Initializes a new instance of the RadNavigationViewItem class.

Declaration

cs-api-definition
public RadNavigationViewItem()

Fields

CalculatedItemIndentationProperty

Identifies the CalculatedItemIndentation dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CalculatedItemIndentationProperty

Field Value

DependencyProperty

CollapsedEvent

Identifies the Collapsed routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent CollapsedEvent

Field Value

RoutedEvent

CollapsedIconProperty

Identifies the CollapsedIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CollapsedIconProperty

Field Value

DependencyProperty

CollapsedIconTemplateProperty

Identifies the CollapsedIconTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CollapsedIconTemplateProperty

Field Value

DependencyProperty

DisplayMemberPathProperty

Identifies the DisplayMemberPath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DisplayMemberPathProperty

Field Value

DependencyProperty

ExpandedEvent

Identifies the Expanded routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ExpandedEvent

Field Value

RoutedEvent

ExpandedIconProperty

Identifies the ExpandedIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpandedIconProperty

Field Value

DependencyProperty

ExpandedIconTemplateProperty

Identifies the ExpandedIconTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpandedIconTemplateProperty

Field Value

DependencyProperty

HasSelectedSubItemProperty

Identifies the HasSelectedSubItem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasSelectedSubItemProperty

Field Value

DependencyProperty

IconProperty

Identifies the Icon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconProperty

Field Value

DependencyProperty

IconTemplateProperty

Identifies the IconTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconTemplateProperty

Field Value

DependencyProperty

IconTemplateSelectorProperty

Identifies the IconTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconTemplateSelectorProperty

Field Value

DependencyProperty

IconVisibilityProperty

Identifies the IconVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IconVisibilityProperty

Field Value

DependencyProperty

IsExpandedProperty

Identifies the IsExpanded dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsExpandedProperty

Field Value

DependencyProperty

IsHighlightedProperty

Identifies the IsHighlighted dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsHighlightedProperty

Field Value

DependencyProperty

IsSelectableProperty

Identifies the IsSelectable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectableProperty

Field Value

DependencyProperty

IsSelectedProperty

Identifies the IsSelected dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectedProperty

Field Value

DependencyProperty

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemContainerStyleProperty

Field Value

DependencyProperty

ItemTemplateProperty

Identifies the ItemTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemTemplateProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

Properties

CalculatedItemIndentation

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

Declaration

cs-api-definition
public double CalculatedItemIndentation { get; }

Property Value

double

CollapsedIcon

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public object CollapsedIcon { get; set; }

Property Value

object

CollapsedIconTemplate

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public DataTemplate CollapsedIconTemplate { get; set; }

Property Value

DataTemplate

DisplayMemberPath

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

Declaration

cs-api-definition
public string DisplayMemberPath { get; set; }

Property Value

string

ExpandedIcon

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public object ExpandedIcon { get; set; }

Property Value

object

ExpandedIconTemplate

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public DataTemplate ExpandedIconTemplate { get; set; }

Property Value

DataTemplate

HasSelectedSubItem

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

Declaration

cs-api-definition
public bool HasSelectedSubItem { get; set; }

Property Value

bool

Icon

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public object Icon { get; set; }

Property Value

object

IconTemplate

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public DataTemplate IconTemplate { get; set; }

Property Value

DataTemplate

IconTemplateSelector

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

Declaration

cs-api-definition
[SRCategory("Appearance")]
public DataTemplateSelector IconTemplateSelector { get; set; }

Property Value

DataTemplateSelector

IconVisibility

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

Declaration

cs-api-definition
public Visibility IconVisibility { get; set; }

Property Value

Visibility

IsExpanded

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

Declaration

cs-api-definition
public bool IsExpanded { get; set; }

Property Value

bool

IsHighlighted

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

Declaration

cs-api-definition
public bool IsHighlighted { get; set; }

Property Value

bool

IsSelectable

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.

Declaration

cs-api-definition
public bool IsSelectable { get; set; }

Property Value

bool

IsSelected

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

Declaration

cs-api-definition
public bool IsSelected { get; set; }

Property Value

bool

IsTopLevel

Gets value that indicates the RadNavigationViewItem is top level.

Declaration

cs-api-definition
public bool IsTopLevel { get; }

Property Value

bool

ItemContainerStyle

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

Declaration

cs-api-definition
public Style ItemContainerStyle { get; set; }

Property Value

Style

ItemTemplate

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

Declaration

cs-api-definition
public DataTemplate ItemTemplate { get; set; }

Property Value

DataTemplate

Items

Gets the sub items of the RadNavigationViewItem.

Declaration

cs-api-definition
public IList Items { get; }

Property Value

IList

ItemsSource

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

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

Methods

GetContainerForItemOverride()

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

Declaration

cs-api-definition
protected virtual DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

IsItemItsOwnContainerOverride(object)

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

Declaration

cs-api-definition
protected virtual bool IsItemItsOwnContainerOverride(object item)

Parameters

item

object

The item to check.

Returns

bool

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

OnApplyTemplate()

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

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnClick()

Raises the routed event.

Declaration

cs-api-definition
protected override void OnClick()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnGotFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnInitialized(EventArgs)

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

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsExpandedChanged()

Invoked when the IsExpanded property changes.

Declaration

cs-api-definition
protected virtual void OnIsExpandedChanged()

OnIsSelectedChanged()

Called when selection is changed.

Declaration

cs-api-definition
protected virtual void OnIsSelectedChanged()

OnLostFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnLostFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnMouseEnter(MouseEventArgs)

Responds to a MouseEnter event.

Declaration

cs-api-definition
protected override void OnMouseEnter(MouseEventArgs e)

Parameters

e

MouseEventArgs

The MouseEventArgs instance containing the event data.

OnMouseLeave(MouseEventArgs)

Responds to a MouseLeave event.

Declaration

cs-api-definition
protected override void OnMouseLeave(MouseEventArgs e)

Parameters

e

MouseEventArgs

The MouseEventArgs instance containing the event data.

OnMouseMove(MouseEventArgs)

Responds to a MouseMove event.

Declaration

cs-api-definition
protected override void OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

The MouseEventArgs instance containing the event data.

OnMouseWheel(MouseWheelEventArgs)

Responds to a MouseWheel event.

Declaration

cs-api-definition
protected override void OnMouseWheel(MouseWheelEventArgs e)

Parameters

e

MouseWheelEventArgs

The MouseWheelEventArgs instance containing the event data.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

Events

Collapsed

Occurs when the RadNavigationViewItem gets collapsed.

Declaration

cs-api-definition
public event RoutedEventHandler Collapsed

Event Value

RoutedEventHandler

Expanded

Occurs when the RadNavigationViewItem gets expanded.

Declaration

cs-api-definition
public event RoutedEventHandler Expanded

Event Value

RoutedEventHandler