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

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.v24.2.dll

NuGet Package: DevExpress.Wpf.NavBar

#Declaration

public IEnumerable ItemsSource { get; set; }

#Property Value

Type Description
IEnumerable

A data source object that implements the IEnumerable interface.

#Remarks

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).

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemsSource property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also