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:
[TelerikToolboxCategory("Navigation")]
public class RadNavigationViewItem : ButtonBase
Inheritance: objectRadNavigationViewItem
Constructors
Initializes a new instance of the RadNavigationViewItem class.
public RadNavigationViewItem()
Fields
CalculatedItemIndentationProperty
DependencyProperty
Identifies the CalculatedItemIndentation dependency property.
public static readonly DependencyProperty CalculatedItemIndentationProperty
CollapsedEvent
RoutedEvent
Identifies the Collapsed routed event.
public static readonly RoutedEvent CollapsedEvent
CollapsedIconProperty
DependencyProperty
Identifies the CollapsedIcon dependency property.
public static readonly DependencyProperty CollapsedIconProperty
CollapsedIconTemplateProperty
DependencyProperty
Identifies the CollapsedIconTemplate dependency property.
public static readonly DependencyProperty CollapsedIconTemplateProperty
DisplayMemberPathProperty
DependencyProperty
Identifies the DisplayMemberPath dependency property.
public static readonly DependencyProperty DisplayMemberPathProperty
ExpandedEvent
RoutedEvent
Identifies the Expanded routed event.
public static readonly RoutedEvent ExpandedEvent
ExpandedIconProperty
DependencyProperty
Identifies the ExpandedIcon dependency property.
public static readonly DependencyProperty ExpandedIconProperty
ExpandedIconTemplateProperty
DependencyProperty
Identifies the ExpandedIconTemplate dependency property.
public static readonly DependencyProperty ExpandedIconTemplateProperty
HasSelectedSubItemProperty
DependencyProperty
Identifies the HasSelectedSubItem dependency property.
public static readonly DependencyProperty HasSelectedSubItemProperty
IconProperty
DependencyProperty
Identifies the Icon dependency property.
public static readonly DependencyProperty IconProperty
IconTemplateProperty
DependencyProperty
Identifies the IconTemplate dependency property.
public static readonly DependencyProperty IconTemplateProperty
IconTemplateSelectorProperty
DependencyProperty
Identifies the IconTemplateSelector dependency property.
public static readonly DependencyProperty IconTemplateSelectorProperty
IconVisibilityProperty
DependencyProperty
Identifies the IconVisibility dependency property.
public static readonly DependencyProperty IconVisibilityProperty
IsExpandedProperty
DependencyProperty
Identifies the IsExpanded dependency property.
public static readonly DependencyProperty IsExpandedProperty
IsHighlightedProperty
DependencyProperty
Identifies the IsHighlighted dependency property.
public static readonly DependencyProperty IsHighlightedProperty
IsSelectableProperty
DependencyProperty
Identifies the IsSelectable dependency property.
public static readonly DependencyProperty IsSelectableProperty
IsSelectedProperty
DependencyProperty
Identifies the IsSelected dependency property.
public static readonly DependencyProperty IsSelectedProperty
ItemContainerStyleProperty
DependencyProperty
Identifies the ItemContainerStyle dependency property.
public static readonly DependencyProperty ItemContainerStyleProperty
ItemsSourceProperty
DependencyProperty
Identifies the ItemsSource dependency property.
public static readonly DependencyProperty ItemsSourceProperty
ItemTemplateProperty
DependencyProperty
Identifies the ItemTemplate dependency property.
public static readonly DependencyProperty ItemTemplateProperty
Properties
Gets the calculated indentation length for the level of the NavigationViewItem.
public double CalculatedItemIndentation { get; }
Gets or sets the icon that is displayed when the RadNavigationViewItem is in collapsed state. This is a dependency property.
[SRCategory("Appearance")]
public object CollapsedIcon { get; set; }
CollapsedIconTemplate
DataTemplate
Gets or sets the data template used for icon when the RadNavigationViewItem is in collapsed state. This is a dependency property.
[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.
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.
[SRCategory("Appearance")]
public object ExpandedIcon { get; set; }
ExpandedIconTemplate
DataTemplate
Gets or sets the data template used for icon when the RadNavigationViewItem is in expanded state. This is a dependency property.
[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.
public bool HasSelectedSubItem { get; set; }
Gets or sets the icon that appears in a RadNavigationViewItem. This is a dependency property.
[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.
[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.
[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.
public Visibility IconVisibility { get; set; }
Gets or sets a value indicating whether the RadNavigationViewItem is in the expanded state. This is a dependency property.
public bool IsExpanded { get; set; }
Gets or sets a value indicating whether this instance is highlighted. This is a dependency property.
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.
public bool IsSelectable { get; set; }
Gets or sets a value indicating whether this instance is selected. This is a dependency property.
public bool IsSelected { get; set; }
Gets value that indicates the RadNavigationViewItem is top level.
public bool IsTopLevel { get; }
ItemContainerStyle
Style
Gets or sets the System.Windows.Style that is applied to the container element generated for each sub item. This is a dependency property.
public Style ItemContainerStyle { get; set; }
Gets the sub items of the RadNavigationViewItem.
public IList Items { get; }
Gets or sets a collection used to generate the sub items of a RadNavigationViewItem. This is a dependency property.
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.
public DataTemplate ItemTemplate { get; set; }
Methods
GetContainerForItemOverride()
DependencyObject
Creates or identifies the element that is used to display the given item.
protected virtual DependencyObject GetContainerForItemOverride()
DependencyObject
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
public override void OnApplyTemplate()
Raises the routed event.
protected override void OnClick()
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Called before the event occurs.
protected override void OnGotFocus(RoutedEventArgs e)
The data for the event.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Invoked when the IsExpanded property changes.
protected virtual void OnIsExpandedChanged()
Called when selection is changed.
protected virtual void OnIsSelectedChanged()
Called before the event occurs.
protected override void OnLostFocus(RoutedEventArgs e)
The data for the event.
Responds to a MouseEnter event.
protected override void OnMouseEnter(MouseEventArgs e)
The MouseEventArgs instance containing the event data.
Responds to a MouseLeave event.
protected override void OnMouseLeave(MouseEventArgs e)
The MouseEventArgs instance containing the event data.
Responds to a MouseMove event.
protected override void OnMouseMove(MouseEventArgs e)
The MouseEventArgs instance containing the event data.
Responds to a MouseWheel event.
protected override void OnMouseWheel(MouseWheelEventArgs e)
The MouseWheelEventArgs instance containing the event data.
Prepares the specified element to display the specified item.
protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Resets the theme.
public void ResetTheme()
Events
Collapsed
RoutedEventHandler
Occurs when the RadNavigationViewItem gets collapsed.
public event RoutedEventHandler Collapsed
Expanded
RoutedEventHandler
Occurs when the RadNavigationViewItem gets expanded.
public event RoutedEventHandler Expanded