OfficeNavigationBar.Items Property
Provides access to the collection of items.
Namespace: DevExpress.XtraBars.Navigation
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
Type | Description |
---|---|
DevExpress.XtraBars.Navigation.NavigationBarItemCollection | A collection of items. |
Remarks
Items are clickable objects that display labels. You can handle the OfficeNavigationBar.ItemClick event to respond to item clicks. If the OfficeNavigationBar.AllowDrag option is enabled, items can be re-ordered using drag-and-drop.
Elements of the Items collection can be of two types:
- NavigationBarItem is a regular item, which you can add at design time and runtime.
ClientNavigationBarItem is an item automatically created when the OfficeNavigationBar is linked via the OfficeNavigationBar.NavigationClient property to an object that implements the INavigationBarClient interface.
Currently, this interface is implemented by the NavBarControl. When you bind the OfficeNavigationBar to a NavBarControl, a ClientNavigationBarItem is automatically added to the Items collection for each nav bar group in the NavBarControl.Groups collection. Clicking any of these items activates a corresponding nav bar group (this is only noticeable when the NavBarControl is painted using the NavigationPane or SideBar view).
When a ClientNavigationBarItem is automatically added to the Items collection, the OfficeNavigationBar.RegisterItem event fires, which you can handle to perform item customization. The OfficeNavigationBar.UnregisterItem event fires when these items are removed from the Items collection.
See OfficeNavigationBar.NavigationClient to learn more.