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
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.
public RadOfficeNavigationBarElement()
Fields
public static RadProperty UseLargeFontProperty
Properties
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.
public RadContextMenuDropDown ContextMenu { get; }
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.
public override bool EnablePeekPopup { get; set; }
Overrides:
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.
public DisplayStyle ItemsDisplayStyle { get; set; }
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.
public RadMenuSeparatorItem MenuSeparator { get; set; }
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.
public RadMenuItem NavigationOptionsMenuItem { get; set; }
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.
[Browsable(false)]
public RadOfficeNavigationBarOverflowItem OverflowItem { get; }
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.
public OfficeNavigationBarOverflowItemPosition OverflowItemPosition { get; set; }
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.
public bool ShowNavigationOptionsMenuItem { get; set; }
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.
public bool UseCompactFont { get; set; }
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.
public int VisibleItemsCount { get; set; }
Methods
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.
protected override void AddItemCore(RadPageViewItem item)
The RadPageViewItem to add to the navigation bar.
Overrides:
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.
protected override bool CanDropOverItem(RadPageViewItem dragItem, RadPageViewItem hitItem)
The item being dragged.
hitItemRadPageViewItemThe item being targeted for the drop operation.
Returns:True if the drop operation is allowed; otherwise, false.
Overrides:
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.
protected virtual void ClearContextMenu()
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.
protected override void CloseItem(RadPageViewItem item)
The RadPageViewItem to close.
Overrides:
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.
protected override void CreateChildElements()
Overrides:
Creates a new RadOfficeNavigationBarItem that provides specialized functionality for Office Navigation Bar items with appropriate styling and behavior.
protected override RadPageViewItem CreateItem()
A new RadOfficeNavigationBarItem instance.
Overrides:
Creates a specialized OfficeNavigationBarItemContainer to manage the layout and overflow behavior of items in the Office Navigation Bar.
protected override StripViewItemContainer CreateItemContainer()
A new OfficeNavigationBarItemContainer instance.
Overrides:
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.
protected virtual RadPageViewMenuItem CreateMenuItem(RadPageViewItem pageItem)
The RadPageViewItem to create a menu item for.
Returns:A new RadPageViewMenuItem representing the specified page item.
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.
protected virtual RadMenuItem CreateNavigationOptionsMenuItem()
A new RadMenuItem for navigation options.
Creates the separator item used in the context menu to visually separate the navigation options menu item from the list of hidden navigation items.
protected virtual RadMenuSeparatorItem CreateNavigationOptionsSeparatorItem()
A new RadMenuSeparatorItem for the context menu.
Creates the context menu used to display navigation options and hidden items. This virtual method allows customization of the context menu appearance and behavior.
protected virtual RadContextMenuDropDown CreateOptionsContextMenu()
A new RadContextMenuDropDown instance for the navigation options.
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.
protected virtual OfficeNavigationBarOptionsDialog CreateOptionsDialog()
OfficeNavigationBarOptionsDialog
A new OfficeNavigationBarOptionsDialog instance.
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.
protected virtual RadOfficeNavigationBarOverflowItem CreateOverflowItem()
RadOfficeNavigationBarOverflowItem
A new RadOfficeNavigationBarOverflowItem instance.
Releases the managed resources used by this Office Navigation Bar element, including the overflow item and other associated resources.
protected override void DisposeManagedResources()
Overrides:
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.
protected override void InitializeFields()
Overrides:
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.
protected override void OnItemClick(RadPageViewItem sender, EventArgs e)
The navigation item that was clicked.
eEventArgsThe event arguments, expected to be MouseEventArgs for overflow item handling.
Overrides:
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.
protected override void OnItemMouseDown(RadPageViewItem sender, MouseEventArgs e)
The navigation item that received the mouse down event.
eMouseEventArgsThe mouse event arguments containing button and position information.
Overrides:
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.
protected virtual void OnOverflowItemClick(MouseEventArgs e)
The MouseEventArgs containing information about the mouse click.
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.
protected virtual void OnShowOptionsDialogItemClick()
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.
protected virtual void RebuildContextMenu()
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.
protected override PropertyDescriptorCollection ReplaceDefaultDescriptors(PropertyDescriptorCollection props)
The collection of property descriptors to process.
Returns:The modified PropertyDescriptorCollection with updated serialization settings.
Overrides:
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.
protected virtual void SetItemsDisplayStyle(DisplayStyle value)
The DisplayStyle to apply to all navigation items.
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.
protected override void UpdateItemOrientation(IEnumerable items)
The collection of items to update orientation for.
Overrides:
Events
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.
public event CreateOfficeNavigationBarOptionsDialogEventHandler CreateNavigationOptionsDialog