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.v20.1.dll

Declaration

[DefaultValue(null)]
[DXCategory("Navigation Client")]
public INavigationBarClient NavigationClient { get; set; }
<DefaultValue(Nothing)>
<DXCategory("Navigation Client")>
Public Property NavigationClient As INavigationBarClient

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.

OfficeNavBar - NavBar Animation 1

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