ListBoxEdit.GroupStyle Property

Gets a collection of GroupStyle objects that define the appearance of each group level.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public ObservableCollection<GroupStyle> GroupStyle { get; }
Public ReadOnly Property GroupStyle As ObservableCollection(Of GroupStyle)

Property Value

Type Description
ObservableCollection<GroupStyle>

One or more GroupStyle objects.

Remarks

DevExpress WPF ComboBoxEdit, LookUpEdit and ListBoxEdit controls include support for ICollectionView – allowing you to manipulate the current record and define rules for filtering, sorting and grouping.

By default, if a grouping rule is defined in the ICollectionView, editors display the plain list in which items are sorted to accomplish data grouping. Use the GroupStyle property to visually enhance the presentation of grouped items. For instance, you can display expandable groups (see the image below):

GroupStyle_listbox

NOTE

When grouping is used, the ListBoxEdit control scrolls items per group by default. To change this behavior, set the VirtualizingPanel.IsVirtualizingWhenGrouping attached property to true.

<dxe:ListBoxEdit VirtualizingPanel.IsVirtualizingWhenGrouping="True">
   ...
</dxe:ListBoxEdit>

Example

NOTE

A complete sample project is available at https://github.com/DevExpress-Examples/ListBoxEdit-group-mode

Implements

DevExpress.Xpf.Editors.Internal.ISelectorEdit.GroupStyle
See Also