Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

OfficeNavigationBar.NavigationClient Property

Assign a NavBarControl, AccordionControl or NavigationFrame to this property to automatically fill this OfficeNavigationBar with items that match NavigationClient’s items. If the OfficeNavigationBar.AllowItemSelection property is enabled, OfficeNavigationBar item selection forces the associated Accordion/NavBarControl to select a corresponding group.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DefaultValue(null)]
[DXCategory("Navigation Client")]
public INavigationBarClient NavigationClient { get; set; }

#Property Value

Type Default Description
DevExpress.Utils.Navigation.INavigationBarClient null

A control that implements the INavigationBarClient interface which serves as an item source for this OfficeNavigationBar.

#Remarks

The animation below illustrates an OfficeNavigationBar with three items. When a user selects an item, the NavBarControl automatically activates the corresponding group. Animation effects are provided by the Navigation Frame control.

This interaction fails if:

Note

OfficeNavigationBar items retrieved from NavigationClient groups are initialized when the application starts, and do not exist at design time. For that reason, do not use the OfficeNavigationBar.SelectedItem property at design time to choose the initially selected OfficeNavigationBar item \ NavigationClient group. Instead, use the AccordionControl.SelectedElement and NavBarControl.ActiveGroup properties of the NavigationClient.

To customize auto-generated OfficeNavigationBar items, handle the OfficeNavigationBar.RegisterItem event. The following sample illustrates how to assign the same vector icons Accordion groups use to OfficeNavigationBar items.

private void officeNavigationBar1_RegisterItem(object sender, DevExpress.XtraBars.Navigation.NavigationBarNavigationClientItemEventArgs e) {
    e.Item.ImageOptions.SvgImageSize = new Size(24, 24);
    e.Item.ImageOptions.SvgImage = (e.NavigationItem as AccordionControlElement).ImageOptions.SvgImage;
}
See Also