Skip to main content

NavBarControl.ItemsSource Property

Gets or sets the data source that is used to generate the content of the NavBar control.

Namespace: DevExpress.Xpf.NavBar

Assembly: DevExpress.Xpf.NavBar.v22.1.dll


public IEnumerable ItemsSource { get; set; }

Property Value

Type Description

A data source object that implements the IEnumerable interface.


Use the ItemsSource property to populate the NavBar control with groups and items taken from the specified data source. When the NavBar control is bound to a data source, data source items are represented by NavBar items organized in groups, dependent on the NavBarControl.GroupDescription property setting.

If the NavBar is bound to a data source, its NavBarControl.Groups and NavBarGroup.Items collections are populated implicitly, have a fixed size and cannot be explicitly modified.

During data binding of a NavBar element (a group or item), the corresponding event (NavBarViewBase.GroupAdding or NavBarViewBase.ItemAdding) is generated, allowing you to access the created element’s data source item (see the event argument’s ElementAddingEventArgs.SourceObject property).

See Also