ClassRadOfficeNavigationBarElement
Represents the element for an Office Navigation Bar that provides navigation functionality similar to Microsoft Outlook's navigation pane. This element extends RadPageViewStripElement to offer specialized features including overflow handling, context menus, customizable display styles, font options, and navigation options dialog integration.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadOfficeNavigationBarElement : RadPageViewStripElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadPageViewElementBaseRadPageViewElementRadPageViewStripElementRadOfficeNavigationBarElement
Implements:
Inherited Members
Constructors
RadOfficeNavigationBarElement()
Initializes a new instance of the RadOfficeNavigationBarElement class with default settings for Office Navigation Bar functionality, disabling strip buttons and preparing the element for navigation bar operations.
Declaration
public RadOfficeNavigationBarElement()
Fields
UseLargeFontProperty
Declaration
public static RadProperty UseLargeFontProperty
Field Value
Properties
ContextMenu
Gets the context menu that displays navigation options and hidden navigation items when the overflow item is clicked. This menu is automatically populated based on current visibility settings and available items.
Declaration
public RadContextMenuDropDown ContextMenu { get; }
Property Value
EnablePeekPopup
Gets or sets a value indicating whether peek popups are enabled for navigation items when hovered with the mouse. When enabled, popups can display additional content configured through the PeekPopupOpening event, providing quick previews of navigation item content.
Declaration
public override bool EnablePeekPopup { get; set; }
Property Value
Overrides
ItemsDisplayStyle
Gets or sets the display style for navigation items, determining whether items show text only, image only, or both text and image. This property affects the visual presentation of all navigation items.
Declaration
public DisplayStyle ItemsDisplayStyle { get; set; }
Property Value
MenuSeparator
Gets or sets the separator item used in the context menu to visually separate the navigation options menu item from the list of hidden navigation items. This separator is displayed only when both elements are present.
Declaration
public RadMenuSeparatorItem MenuSeparator { get; set; }
Property Value
NavigationOptionsMenuItem
Gets or sets the menu item that opens the navigation options dialog when clicked. This menu item appears in the context menu and allows users to configure navigation bar settings such as item visibility and order.
Declaration
public RadMenuItem NavigationOptionsMenuItem { get; set; }
Property Value
OverflowItem
Gets the RadOfficeNavigationBarOverflowItem that provides access to hidden navigation items through a context menu when clicked. This item is automatically managed based on available space and item visibility.
Declaration
[Browsable(false)]
public RadOfficeNavigationBarOverflowItem OverflowItem { get; }
Property Value
OverflowItemPosition
Gets or sets the position of the OverflowItem relative to the visible navigation items. The overflow item can be positioned at the front (before visible items) or at the end (after visible items) of the navigation bar.
Declaration
public OfficeNavigationBarOverflowItemPosition OverflowItemPosition { get; set; }
Property Value
ShowNavigationOptionsMenuItem
Gets or sets a value indicating whether to display the navigation options menu item in the context menu. When true, users can access the navigation options dialog to customize the navigation bar settings.
Declaration
public bool ShowNavigationOptionsMenuItem { get; set; }
Property Value
UseCompactFont
Gets or sets a value indicating whether to use compact font styling for navigation items. When true, items use a smaller, more condensed font; when false, items use a larger, more prominent font for improved readability.
VisibleItemsCount
Gets or sets the maximum number of navigation items visible on the navigation bar. When the total number of items exceeds this value, additional items are accessible through the overflow item. If not explicitly set, returns the total item count.
Methods
AddItemCore(RadPageViewItem)
Adds a new item to the navigation bar and ensures the overflow item is positioned correctly based on the current OverflowItemPosition setting. Manages the layout of both regular items and the overflow item.
Declaration
protected override void AddItemCore(RadPageViewItem item)
Parameters
item
The RadPageViewItem to add to the navigation bar.
Overrides
CanDropOverItem(RadPageViewItem, RadPageViewItem)
Determines whether a drag operation can drop an item over the specified hit item. Prevents dropping items over the overflow item while allowing normal drag-and-drop operations between regular navigation items.
Declaration
protected override bool CanDropOverItem(RadPageViewItem dragItem, RadPageViewItem hitItem)
Parameters
dragItem
The item being dragged.
hitItem
The item being targeted for the drop operation.
Returns
True if the drop operation is allowed; otherwise, false.
Overrides
ClearContextMenu()
Clears all items from the context menu and unsubscribes from their click events to prevent memory leaks. This method is called before rebuilding the context menu with current items.
Declaration
protected virtual void ClearContextMenu()
CloseItem(RadPageViewItem)
Closes the specified item if it's not the overflow item. The overflow item is a system item that cannot be closed and provides access to hidden navigation items.
Declaration
protected override void CloseItem(RadPageViewItem item)
Parameters
item
The RadPageViewItem to close.
Overrides
CreateChildElements()
Creates and initializes the child elements specific to the Office Navigation Bar, including the specialized item container, overflow item, and removes unnecessary elements like buttons panel, header, and footer.
Declaration
protected override void CreateChildElements()
Overrides
CreateItem()
Creates a new RadOfficeNavigationBarItem that provides specialized functionality for Office Navigation Bar items with appropriate styling and behavior.
Declaration
protected override RadPageViewItem CreateItem()
Returns
A new RadOfficeNavigationBarItem instance.
Overrides
CreateItemContainer()
Creates a specialized OfficeNavigationBarItemContainer to manage the layout and overflow behavior of items in the Office Navigation Bar.
Declaration
protected override StripViewItemContainer CreateItemContainer()
Returns
A new OfficeNavigationBarItemContainer instance.
Overrides
CreateMenuItem(RadPageViewItem)
Creates a menu item representation of a page view item for display in the overflow context menu. This allows hidden navigation items to be accessible through the context menu.
Declaration
protected virtual RadPageViewMenuItem CreateMenuItem(RadPageViewItem pageItem)
Parameters
pageItem
The RadPageViewItem to create a menu item for.
Returns
A new RadPageViewMenuItem representing the specified page item.
CreateNavigationOptionsMenuItem()
Creates the menu item that opens the navigation options dialog when clicked. This virtual method allows customization of the menu item's appearance and text.
Declaration
protected virtual RadMenuItem CreateNavigationOptionsMenuItem()
Returns
A new RadMenuItem for navigation options.
CreateNavigationOptionsSeparatorItem()
Creates the separator item used in the context menu to visually separate the navigation options menu item from the list of hidden navigation items.
Declaration
protected virtual RadMenuSeparatorItem CreateNavigationOptionsSeparatorItem()
Returns
A new RadMenuSeparatorItem for the context menu.
CreateOptionsContextMenu()
Creates the context menu used to display navigation options and hidden items. This virtual method allows customization of the context menu appearance and behavior.
Declaration
protected virtual RadContextMenuDropDown CreateOptionsContextMenu()
Returns
A new RadContextMenuDropDown instance for the navigation options.
CreateOptionsDialog()
Creates the options dialog that allows users to customize the navigation bar settings, including item visibility and ordering. Raises the CreateNavigationOptionsDialog event to allow dialog customization.
Declaration
protected virtual OfficeNavigationBarOptionsDialog CreateOptionsDialog()
Returns
OfficeNavigationBarOptionsDialog
A new OfficeNavigationBarOptionsDialog instance.
CreateOverflowItem()
Creates the overflow item that provides access to hidden navigation items when the available space is insufficient to display all items. This virtual method allows customization of the overflow item behavior.
Declaration
protected virtual RadOfficeNavigationBarOverflowItem CreateOverflowItem()
Returns
RadOfficeNavigationBarOverflowItem
A new RadOfficeNavigationBarOverflowItem instance.
DisposeManagedResources()
Releases the managed resources used by this Office Navigation Bar element, including the overflow item and other associated resources.
Declaration
protected override void DisposeManagedResources()
Overrides
InitializeFields()
Initializes the default field values for the Office Navigation Bar, setting up display style, alignment, button visibility options, and enabling context menu and peek popup functionality.
Declaration
protected override void InitializeFields()
Overrides
OnItemClick(RadPageViewItem, EventArgs)
Handles click events on navigation items. For regular items, delegates to the base implementation for standard click handling. For the overflow item, triggers the overflow menu display functionality.
Declaration
protected override void OnItemClick(RadPageViewItem sender, EventArgs e)
Parameters
sender
The navigation item that was clicked.
e
The event arguments, expected to be MouseEventArgs for overflow item handling.
Overrides
OnItemMouseDown(RadPageViewItem, MouseEventArgs)
Handles mouse down events on navigation items. For the overflow item, stops any active peek timer to prevent popup display. For regular items, delegates to the base implementation for standard mouse handling.
Declaration
protected override void OnItemMouseDown(RadPageViewItem sender, MouseEventArgs e)
Parameters
sender
The navigation item that received the mouse down event.
e
The mouse event arguments containing button and position information.
Overrides
OnOverflowItemClick(MouseEventArgs)
Handles click events on the overflow item by displaying the context menu with navigation options and hidden items. The context menu is shown only for left mouse button clicks when not in design mode.
Declaration
protected virtual void OnOverflowItemClick(MouseEventArgs e)
Parameters
e
The MouseEventArgs containing information about the mouse click.
OnShowOptionsDialogItemClick()
Shows the navigation options dialog which allows users to configure navigation bar display settings. Creates, initializes, and displays the modal dialog for Office Navigation Bar options.
Declaration
protected virtual void OnShowOptionsDialogItemClick()
RebuildContextMenu()
Rebuilds the context menu by adding the navigation options menu item (if enabled) and menu items for all currently hidden navigation items. This method is called before displaying the context menu to ensure current state.
Declaration
protected virtual void RebuildContextMenu()
ReplaceDefaultDescriptors(PropertyDescriptorCollection)
Replaces default property descriptors to enable proper serialization of Office Navigation Bar specific properties when used within RadPageView. Configures custom serialization for navigation-specific properties.
Declaration
protected override PropertyDescriptorCollection ReplaceDefaultDescriptors(PropertyDescriptorCollection props)
Parameters
props
The collection of property descriptors to process.
Returns
The modified PropertyDescriptorCollection with updated serialization settings.
Overrides
SetItemsDisplayStyle(DisplayStyle)
Applies the specified display style to all navigation items, controlling whether they display text, images, or both. Updates the visual appearance of items and triggers measurement invalidation.
Declaration
protected virtual void SetItemsDisplayStyle(DisplayStyle value)
Parameters
value
The DisplayStyle to apply to all navigation items.
UpdateItemOrientation(IEnumerable)
Updates the orientation of the specified items and includes the overflow item in the orientation update process. This ensures consistent orientation handling for both regular items and the overflow item.
Declaration
protected override void UpdateItemOrientation(IEnumerable items)
Parameters
items
The collection of items to update orientation for.
Overrides
Events
CreateNavigationOptionsDialog
Occurs when the NavigationOptionsMenuItem is clicked and the options dialog is about to be opened. Suitable place to customize or replace the navigation options dialog.
Declaration
public event CreateOfficeNavigationBarOptionsDialogEventHandler CreateNavigationOptionsDialog
Event Value