Table of Contents

Class GroupDescription

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Describes a grouping operation applied to TableView items. Extends SortDescription since grouping and sorting share the same "extract a value, then order/compare by it" shape - a group's own items, and the groups themselves, are ordered using this description's Direction and Comparer.

public class GroupDescription : SortDescription
Inheritance
object
GroupDescription
Inherited Members

Constructors

GroupDescription(string?, SortDirection, IComparer?, Func<object?, object?>?)

Initializes a new instance of the GroupDescription class.

public GroupDescription(string? propertyName, SortDirection direction = SortDirection.Ascending, IComparer? comparer = null, Func<object?, object?>? valueDelegate = null)

Parameters

propertyName string

The name of the property to group by.

direction SortDirection

The direction groups are ordered in.

comparer IComparer

An optional comparer to use for ordering groups.

valueDelegate Func<object, object>

An optional delegate to extract the value to group by.

Properties

SortMode

Gets or sets what groups at this level are ordered by - their key value (default) or the number of items they contain. Direction still controls ascending/descending of whichever this is set to.

public GroupSortMode SortMode { get; set; }

Property Value

GroupSortMode