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.1.dll
NuGet Package: DevExpress.Wpf.NavBar
Declaration
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).
Related GitHub Examples
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.