NavBarViewBase.GroupAdding Event
Occurs after a group has been implicitly created and bound to a data source, but prior to adding it to the NavBar control.
Namespace: DevExpress.Xpf.NavBar
Assembly: DevExpress.Xpf.NavBar.v24.1.dll
NuGet Package: DevExpress.Wpf.NavBar
Declaration
Event Data
The GroupAdding event's data class is GroupAddingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Group | Gets a group object related to the event. |
SourceObject | Gets the data item to which the event related element (a group or item) is bound. Inherited from ElementAddingEventArgs. |
Remarks
The GroupAdding event is raised for each group after it is bound to the corresponding data from the data source specified via the NavBarControl.ItemsSource property. This event enables you to customize settings of the related group before it is finally added to the NavBar’s NavBarControl.Groups collection, which cannot be explicitly modified for a data bound NavBar control. Handling the GroupAdding event correctly you can, for example, implement custom logic to dynamically map properties of a NavBar control’s groups to the required data fields.
The processed NavBar group and its corresponding data source item can be accessed by using the GroupAddingEventArgs.Group and ElementAddingEventArgs.SourceObject properties of the event’s argument, respectively.
If the NavBar control functions in unbound mode, the GroupAdding event isn’t raised.