ClassRadNavigationView
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")]
[SuppressMessage("Design", "CA1001:Types that own disposable fields should be disposable", Justification = "<Pending>")]
public class RadNavigationView : Selector
Inheritance: objectRadNavigationView
Constructors
RadNavigationView()
Initializes a new instance of the RadNavigationView class.
Declaration
public RadNavigationView()
Fields
AllowMultipleExpandedItemsProperty
Identifies the AllowMultipleExpandedItems dependency property.
Declaration
public static readonly DependencyProperty AllowMultipleExpandedItemsProperty
Field Value
DependencyProperty
AllowSingleClickExpandInCompactModeProperty
Identifies the AllowSingleClickExpandInCompactMode dependency property.
Declaration
public static readonly DependencyProperty AllowSingleClickExpandInCompactModeProperty
Field Value
DependencyProperty
AutoChangeDisplayModeProperty
Identifies the AutoChangeDisplayMode dependency property.
Declaration
public static readonly DependencyProperty AutoChangeDisplayModeProperty
Field Value
DependencyProperty
CanKeyboardNavigationSelectItemsProperty
Identifies the CanKeyboardNavigationSelectItems dependency property.
Declaration
public static readonly DependencyProperty CanKeyboardNavigationSelectItemsProperty
Field Value
DependencyProperty
CompactModeThresholdWidthProperty
Identifies the CompactModeThresholdWidth dependency property.
Declaration
public static readonly DependencyProperty CompactModeThresholdWidthProperty
Field Value
DependencyProperty
CompactPaneWidthProperty
Identifies the CompactPaneWidth dependency property.
Declaration
public static readonly DependencyProperty CompactPaneWidthProperty
Field Value
DependencyProperty
ContentProperty
Identifies the Content dependency property.
Declaration
public static readonly DependencyProperty ContentProperty
Field Value
DependencyProperty
ContentTemplateProperty
Identifies the ContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ContentTemplateProperty
Field Value
DependencyProperty
DisplayModeProperty
Identifies the DisplayMode dependency property.
Declaration
public static readonly DependencyProperty DisplayModeProperty
Field Value
DependencyProperty
ExpandedModeThresholdWidthProperty
Identifies the ExpandedModeThresholdWidth dependency property.
Declaration
public static readonly DependencyProperty ExpandedModeThresholdWidthProperty
Field Value
DependencyProperty
ExpandedPaneWidthProperty
Identifies the ExpandedPaneWidth dependency property.
Declaration
public static readonly DependencyProperty ExpandedPaneWidthProperty
Field Value
DependencyProperty
IsPaneOpenProperty
Identifies the IsPaneOpen dependency property.
Declaration
public static readonly DependencyProperty IsPaneOpenProperty
Field Value
DependencyProperty
PaneBackgroundProperty
Identifies the PaneBackground dependency property.
Declaration
public static readonly DependencyProperty PaneBackgroundProperty
Field Value
DependencyProperty
PaneClosedEvent
Identifies the PaneClosed routed event.
Declaration
public static readonly RoutedEvent PaneClosedEvent
Field Value
RoutedEvent
PaneFooterProperty
Identifies the PaneFooter dependency property.
Declaration
public static readonly DependencyProperty PaneFooterProperty
Field Value
DependencyProperty
PaneFooterTemplateProperty
Identifies the PaneFooterTemplate dependency property.
Declaration
public static readonly DependencyProperty PaneFooterTemplateProperty
Field Value
DependencyProperty
PaneFooterTemplateSelectorProperty
Identifies the PaneFooterTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty PaneFooterTemplateSelectorProperty
Field Value
DependencyProperty
PaneHeaderBackgroundProperty
Identifies the PaneHeaderBackground dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderBackgroundProperty
Field Value
DependencyProperty
PaneHeaderForegroundProperty
Identifies the PaneHeaderForeground dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderForegroundProperty
Field Value
DependencyProperty
PaneHeaderHeightProperty
Identifies the PaneHeaderHeight dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderHeightProperty
Field Value
DependencyProperty
PaneHeaderProperty
Identifies the PaneHeader dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderProperty
Field Value
DependencyProperty
PaneHeaderTemplateProperty
Identifies the PaneHeaderTemplate dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderTemplateProperty
Field Value
DependencyProperty
PaneHeaderTemplateSelectorProperty
Identifies the PaneHeaderTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty PaneHeaderTemplateSelectorProperty
Field Value
DependencyProperty
PaneOpenedEvent
Identifies the PaneOpened routed event.
Declaration
public static readonly RoutedEvent PaneOpenedEvent
Field Value
RoutedEvent
PaneToggleButtonContentProperty
Identifies the PaneToggleButtonContent dependency property.
Declaration
public static readonly DependencyProperty PaneToggleButtonContentProperty
Field Value
DependencyProperty
PaneToggleButtonContentTemplateProperty
Identifies the PaneToggleButtonContentTemplate dependency property.
Declaration
public static readonly DependencyProperty PaneToggleButtonContentTemplateProperty
Field Value
DependencyProperty
PaneToggleButtonStyleProperty
Identifies the PaneToggleButtonStyle dependency property.
Declaration
public static readonly DependencyProperty PaneToggleButtonStyleProperty
Field Value
DependencyProperty
PaneToggleButtonVisibilityProperty
Identifies the PaneToggleButtonVisibility dependency property.
Declaration
public static readonly DependencyProperty PaneToggleButtonVisibilityProperty
Field Value
DependencyProperty
PaneWidthProperty
Identifies the PaneWidth dependency property.
Declaration
public static readonly DependencyProperty PaneWidthProperty
Field Value
DependencyProperty
SelectedItemProperty
Identifies the SelectedItem dependency property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
DependencyProperty
SubItemsIndentationProperty
Identifies the SubItemsIndentation dependency property.
Declaration
public static readonly DependencyProperty SubItemsIndentationProperty
Field Value
DependencyProperty
Properties
AllowMultipleExpandedItems
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.
Declaration
public bool AllowMultipleExpandedItems { get; set; }
Property Value
AllowSingleClickExpandInCompactMode
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.
Declaration
public bool AllowSingleClickExpandInCompactMode { get; set; }
Property Value
AutoChangeDisplayMode
Gets or sets a value that indicates if the NavigationView will auto change the display modes depending on its width.
CanKeyboardNavigationSelectItems
Gets or sets the value specifying whether the keyboard navigation in the NavigationView should change the selection.
Declaration
public bool CanKeyboardNavigationSelectItems { get; set; }
Property Value
CompactModeThresholdWidth
Gets or sets the minimum width at which the NavigationView enters Compact display mode.
Declaration
public double CompactModeThresholdWidth { get; set; }
Property Value
CompactPaneWidth
Gets or sets the width of the NavigationView pane in its compact display mode.
Content
Gets or sets the content of RadNavigationView.
ContentTemplate
Gets or sets the content template of RadNavigationView.
Declaration
public DataTemplate ContentTemplate { get; set; }
Property Value
DataTemplate
DisplayMode
Gets or sets a value that indicates where the NavigationView pane is currently shown.
Declaration
public NavigationViewDisplayMode DisplayMode { get; set; }
Property Value
ExpandedModeThresholdWidth
Gets or sets the minimum width at which the NavigationView enters Expanded display mode.
Declaration
public double ExpandedModeThresholdWidth { get; set; }
Property Value
ExpandedPaneWidth
Gets or sets the width of the NavigationView pane when it's fully expanded.
HighlightedIndex
Gets the index of the highlighted item - it works only for top level items. For sub items the property returns -1.
Declaration
public int HighlightedIndex { get; }
Property Value
The index of the highlighted item.
IsPaneOpen
Gets or sets a value that specifies whether the NavigationView pane is expanded to its full width.
LogicalChildren
Gets an enumerator for the logical child objects of the System.Windows.Controls.ItemsControl object.
Declaration
protected override IEnumerator LogicalChildren { get; }
Property Value
PaneBackground
Gets or sets the background of the pane.
Declaration
public Brush PaneBackground { get; set; }
Property Value
Brush
PaneFooter
Gets or sets the content for the pane footer.
PaneFooterTemplate
Gets or sets the content template for the pane footer.
Declaration
public DataTemplate PaneFooterTemplate { get; set; }
Property Value
DataTemplate
PaneFooterTemplateSelector
Gets or sets the content template selector for the pane footer.
Declaration
public DataTemplateSelector PaneFooterTemplateSelector { get; set; }
Property Value
DataTemplateSelector
PaneHeader
Gets or sets the content for the pane header.
PaneHeaderBackground
Gets or sets the background of the pane header.
Declaration
public Brush PaneHeaderBackground { get; set; }
Property Value
Brush
PaneHeaderForeground
Gets or sets the foreground of the pane header.
Declaration
public Brush PaneHeaderForeground { get; set; }
Property Value
Brush
PaneHeaderHeight
Gets or sets the height of the pane header.
PaneHeaderTemplate
Gets or sets the content template for the pane header.
Declaration
public DataTemplate PaneHeaderTemplate { get; set; }
Property Value
DataTemplate
PaneHeaderTemplateSelector
Gets or sets the content template selector for the pane header.
Declaration
public DataTemplateSelector PaneHeaderTemplateSelector { get; set; }
Property Value
DataTemplateSelector
PaneToggleButtonContent
Gets or sets the content of the pane toggle button.
Declaration
public object PaneToggleButtonContent { get; set; }
Property Value
PaneToggleButtonContentTemplate
Gets or sets the content template of the pane toggle button.
Declaration
public DataTemplate PaneToggleButtonContentTemplate { get; set; }
Property Value
DataTemplate
PaneToggleButtonStyle
Gets or sets the Style of the pane toggle button.
Declaration
public Style PaneToggleButtonStyle { get; set; }
Property Value
Style
PaneToggleButtonVisibility
Gets or sets the Visibility of the pane toggle button.
Declaration
public Visibility PaneToggleButtonVisibility { get; set; }
Property Value
Visibility
PaneWidth
Gets a value that specifies the current width of the pane.
SelectedItem
Gets or sets the first item in the current selection or returns null if the selection is empty.
SubItemsIndentation
Gets or sets the indentation length for the sub NavigationViewItems.
Methods
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
DependencyObject
HandleKeyDown(Key)
Contains the keyboard navigation logic of RadNavigationView.
Declaration
protected virtual bool HandleKeyDown(Key key)
Parameters
key
Key
The key that has been pressed.
Returns
True if the KeyDown event should be handled, otherwise false.
IsIndexSelectable(int)
Determines whether the index is selectable.
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own container.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call. .
Declaration
public override void OnApplyTemplate()
OnContentChanged(object, object)
Invoked when the Content property changes.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
The type-specific AutomationPeer implementation.
OnDisplayModeChanged()
Invoked when the DisplayMode property changes.
Declaration
protected virtual void OnDisplayModeChanged()
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnIsPaneOpenChanged()
Invoked when the IsPaneOpen property changes.
Declaration
protected virtual void OnIsPaneOpenChanged()
OnItemClick(RoutedEventArgs)
Raises the ItemClick event.
Declaration
protected virtual void OnItemClick(RoutedEventArgs args)
Parameters
args
RoutedEventArgs
The RoutedEventArgs instance containing the event data.
OnRenderSizeChanged(SizeChangedInfo)
This is invoked after layout update before rendering if the element's RenderSize has changed as a result of layout update.
Declaration
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Parameters
sizeInfo
SizeChangedInfo
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
Element used to display the specified item.
item
Specified item.
ScrollIntoView(int)
Scrolls the item on given index into view.
ScrollIntoView(object)
Scrolls the item into view.
Events
ItemClick
Occurs when an item was clicked.
Declaration
public event RoutedEventHandler ItemClick
Event Value
RoutedEventHandler
ItemCollapsed
Occurs when the RadNavigationViewItem gets collapsed.
Declaration
public event RoutedEventHandler ItemCollapsed
Event Value
RoutedEventHandler
ItemExpanded
Occurs when the RadNavigationViewItem gets expanded.
Declaration
public event RoutedEventHandler ItemExpanded
Event Value
RoutedEventHandler
PaneClosed
Occurs when the NavigationView pane is closed.
Declaration
public event RoutedEventHandler PaneClosed
Event Value
RoutedEventHandler
PaneOpened
Occurs when the NavigationView pane is opened.
Declaration
public event RoutedEventHandler PaneOpened
Event Value
RoutedEventHandler