RadNavigationView
Represents a control that implements a modern hamburger menu navigation system for application content. This class provides a flexible and responsive interface for managing navigation views with multiple display modes, including Compact, Expanded, and Minimal. It allows for navigation item selection, keyboard navigation, and visual feedback for item interactions. The control supports a hierarchical structure, enabling the creation of expandable items and submenus. It also includes features such as customizable panes, automatic display mode switching based on width, and event handling for item clicks, pane openings, and closures. The RadNavigationView can be styled and themed to suit different application designs, making it a versatile choice for modern applications.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Navigation.dll
Syntax:
[TelerikToolboxCategory("Navigation")]
public class RadNavigationView : Selector
Inheritance: objectRadNavigationView
Constructors
Initializes a new instance of the RadNavigationView class.
public RadNavigationView()
Fields
AllowMultipleExpandedItemsProperty
DependencyProperty
Identifies the AllowMultipleExpandedItems dependency property.
public static readonly DependencyProperty AllowMultipleExpandedItemsProperty
AllowSingleClickExpandInCompactModeProperty
DependencyProperty
Identifies the AllowSingleClickExpandInCompactMode dependency property.
public static readonly DependencyProperty AllowSingleClickExpandInCompactModeProperty
AutoChangeDisplayModeProperty
DependencyProperty
Identifies the AutoChangeDisplayMode dependency property.
public static readonly DependencyProperty AutoChangeDisplayModeProperty
CanKeyboardNavigationSelectItemsProperty
DependencyProperty
Identifies the CanKeyboardNavigationSelectItems dependency property.
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
CompactModeThresholdWidthProperty
DependencyProperty
Identifies the CompactModeThresholdWidth dependency property.
public static readonly DependencyProperty CompactModeThresholdWidthProperty
CompactPaneWidthProperty
DependencyProperty
Identifies the CompactPaneWidth dependency property.
public static readonly DependencyProperty CompactPaneWidthProperty
ContentProperty
DependencyProperty
Identifies the Content dependency property.
public static readonly DependencyProperty ContentProperty
ContentTemplateProperty
DependencyProperty
Identifies the ContentTemplate dependency property.
public static readonly DependencyProperty ContentTemplateProperty
DisplayModeProperty
DependencyProperty
Identifies the DisplayMode dependency property.
public static readonly DependencyProperty DisplayModeProperty
ExpandedModeThresholdWidthProperty
DependencyProperty
Identifies the ExpandedModeThresholdWidth dependency property.
public static readonly DependencyProperty ExpandedModeThresholdWidthProperty
ExpandedPaneWidthProperty
DependencyProperty
Identifies the ExpandedPaneWidth dependency property.
public static readonly DependencyProperty ExpandedPaneWidthProperty
IsPaneOpenProperty
DependencyProperty
Identifies the IsPaneOpen dependency property.
public static readonly DependencyProperty IsPaneOpenProperty
PaneBackgroundProperty
DependencyProperty
Identifies the PaneBackground dependency property.
public static readonly DependencyProperty PaneBackgroundProperty
PaneClosedEvent
RoutedEvent
Identifies the PaneClosed routed event.
public static readonly RoutedEvent PaneClosedEvent
PaneFooterProperty
DependencyProperty
Identifies the PaneFooter dependency property.
public static readonly DependencyProperty PaneFooterProperty
PaneFooterTemplateProperty
DependencyProperty
Identifies the PaneFooterTemplate dependency property.
public static readonly DependencyProperty PaneFooterTemplateProperty
PaneFooterTemplateSelectorProperty
DependencyProperty
Identifies the PaneFooterTemplateSelector dependency property.
public static readonly DependencyProperty PaneFooterTemplateSelectorProperty
PaneHeaderBackgroundProperty
DependencyProperty
Identifies the PaneHeaderBackground dependency property.
public static readonly DependencyProperty PaneHeaderBackgroundProperty
PaneHeaderForegroundProperty
DependencyProperty
Identifies the PaneHeaderForeground dependency property.
public static readonly DependencyProperty PaneHeaderForegroundProperty
PaneHeaderHeightProperty
DependencyProperty
Identifies the PaneHeaderHeight dependency property.
public static readonly DependencyProperty PaneHeaderHeightProperty
PaneHeaderProperty
DependencyProperty
Identifies the PaneHeader dependency property.
public static readonly DependencyProperty PaneHeaderProperty
PaneHeaderTemplateProperty
DependencyProperty
Identifies the PaneHeaderTemplate dependency property.
public static readonly DependencyProperty PaneHeaderTemplateProperty
PaneHeaderTemplateSelectorProperty
DependencyProperty
Identifies the PaneHeaderTemplateSelector dependency property.
public static readonly DependencyProperty PaneHeaderTemplateSelectorProperty
PaneOpenedEvent
RoutedEvent
Identifies the PaneOpened routed event.
public static readonly RoutedEvent PaneOpenedEvent
PaneToggleButtonContentProperty
DependencyProperty
Identifies the PaneToggleButtonContent dependency property.
public static readonly DependencyProperty PaneToggleButtonContentProperty
PaneToggleButtonContentTemplateProperty
DependencyProperty
Identifies the PaneToggleButtonContentTemplate dependency property.
public static readonly DependencyProperty PaneToggleButtonContentTemplateProperty
PaneToggleButtonStyleProperty
DependencyProperty
Identifies the PaneToggleButtonStyle dependency property.
public static readonly DependencyProperty PaneToggleButtonStyleProperty
PaneToggleButtonVisibilityProperty
DependencyProperty
Identifies the PaneToggleButtonVisibility dependency property.
public static readonly DependencyProperty PaneToggleButtonVisibilityProperty
PaneWidthProperty
DependencyProperty
Identifies the PaneWidth dependency property.
public static readonly DependencyProperty PaneWidthProperty
SelectedItemProperty
DependencyProperty
Identifies the SelectedItem dependency property.
public static readonly DependencyProperty SelectedItemProperty
SubItemsIndentationProperty
DependencyProperty
Identifies the SubItemsIndentation dependency property.
public static readonly DependencyProperty SubItemsIndentationProperty
Properties
Gets or sets value specifying whether multiple top level items can get expanded at the same time. Not supported when the DisplayMode is Compact. The default value is true.
public bool AllowMultipleExpandedItems { get; set; }
Gets or sets a value specifying whether top level RadNavigationViewItems can be expanded with a single click when the DisplayMode is compact and the items are displayed in a flyout. The default value is true.
public bool AllowSingleClickExpandInCompactMode { get; set; }
Gets or sets a value that indicates if the NavigationView will auto change the display modes depending on its width.
public bool AutoChangeDisplayMode { get; set; }
Gets or sets the value specifying whether the keyboard navigation in the NavigationView should change the selection.
public bool CanKeyboardNavigationSelectItems { get; set; }
Gets or sets the minimum width at which the NavigationView enters Compact display mode.
public double CompactModeThresholdWidth { get; set; }
Gets or sets the width of the NavigationView pane in its compact display mode.
public double CompactPaneWidth { get; set; }
Gets or sets the content of RadNavigationView.
public object Content { get; set; }
ContentTemplate
DataTemplate
Gets or sets the content template of RadNavigationView.
public DataTemplate ContentTemplate { get; set; }
Gets or sets a value that indicates where the NavigationView pane is currently shown.
public NavigationViewDisplayMode DisplayMode { get; set; }
Gets or sets the minimum width at which the NavigationView enters Expanded display mode.
public double ExpandedModeThresholdWidth { get; set; }
Gets or sets the width of the NavigationView pane when it's fully expanded.
public double ExpandedPaneWidth { get; set; }
Gets the index of the highlighted item - it works only for top level items. For sub items the property returns -1.
public int HighlightedIndex { get; }
The index of the highlighted item.
Gets or sets a value that specifies whether the NavigationView pane is expanded to its full width.
public bool IsPaneOpen { get; set; }
Gets an enumerator for the logical child objects of the System.Windows.Controls.ItemsControl object.
protected override IEnumerator LogicalChildren { get; }
PaneBackground
Brush
Gets or sets the background of the pane.
public Brush PaneBackground { get; set; }
Gets or sets the content for the pane footer.
public object PaneFooter { get; set; }
PaneFooterTemplate
DataTemplate
Gets or sets the content template for the pane footer.
public DataTemplate PaneFooterTemplate { get; set; }
PaneFooterTemplateSelector
DataTemplateSelector
Gets or sets the content template selector for the pane footer.
public DataTemplateSelector PaneFooterTemplateSelector { get; set; }
Gets or sets the content for the pane header.
public object PaneHeader { get; set; }
PaneHeaderBackground
Brush
Gets or sets the background of the pane header.
public Brush PaneHeaderBackground { get; set; }
PaneHeaderForeground
Brush
Gets or sets the foreground of the pane header.
public Brush PaneHeaderForeground { get; set; }
Gets or sets the height of the pane header.
public double PaneHeaderHeight { get; set; }
PaneHeaderTemplate
DataTemplate
Gets or sets the content template for the pane header.
public DataTemplate PaneHeaderTemplate { get; set; }
PaneHeaderTemplateSelector
DataTemplateSelector
Gets or sets the content template selector for the pane header.
public DataTemplateSelector PaneHeaderTemplateSelector { get; set; }
Gets or sets the content of the pane toggle button.
public object PaneToggleButtonContent { get; set; }
PaneToggleButtonContentTemplate
DataTemplate
Gets or sets the content template of the pane toggle button.
public DataTemplate PaneToggleButtonContentTemplate { get; set; }
Gets or sets the Style of the pane toggle button.
public Style PaneToggleButtonStyle { get; set; }
PaneToggleButtonVisibility
Visibility
Gets or sets the Visibility of the pane toggle button.
public Visibility PaneToggleButtonVisibility { get; set; }
Gets a value that specifies the current width of the pane.
public double PaneWidth { get; }
Gets or sets the first item in the current selection or returns null if the selection is empty.
public object SelectedItem { get; set; }
Gets or sets the indentation length for the sub NavigationViewItems.
public double SubItemsIndentation { get; set; }
Methods
GetContainerForItemOverride()
DependencyObject
Creates or identifies the element that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
DependencyObject
Contains the keyboard navigation logic of RadNavigationView.
protected virtual bool HandleKeyDown(Key key)
The key that has been pressed.
Returns:True if the KeyDown event should be handled, otherwise false.
When overridden in a derived class, is invoked whenever application code or internal processes call. .
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Invoked when the DisplayMode property changes.
protected virtual void OnDisplayModeChanged()
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 IsPaneOpen property changes.
protected virtual void OnIsPaneOpenChanged()
Raises the ItemClick event.
protected virtual void OnItemClick(RoutedEventArgs args)
The RoutedEventArgs instance containing the event data.
This is invoked after layout update before rendering if the element's RenderSize has changed as a result of layout update.
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element used to display the specified item.
itemobjectSpecified item.
Resets the theme.
public void ResetTheme()
Scrolls the item on given index into view.
Scrolls the item into view.
Events
ItemClick
RoutedEventHandler
Occurs when an item was clicked.
public event RoutedEventHandler ItemClick
ItemCollapsed
RoutedEventHandler
Occurs when the RadNavigationViewItem gets collapsed.
public event RoutedEventHandler ItemCollapsed
ItemExpanded
RoutedEventHandler
Occurs when the RadNavigationViewItem gets expanded.
public event RoutedEventHandler ItemExpanded
PaneClosed
RoutedEventHandler
Occurs when the NavigationView pane is closed.
public event RoutedEventHandler PaneClosed
PaneOpened
RoutedEventHandler
Occurs when the NavigationView pane is opened.
public event RoutedEventHandler PaneOpened