PropertyGroupDescription PropertyGroupDescription PropertyGroupDescription PropertyGroupDescription Class

Definition

Describes the grouping of items using a property name as the criteria.

public ref class PropertyGroupDescription : System::ComponentModel::GroupDescription
public class PropertyGroupDescription : System.ComponentModel.GroupDescription
type PropertyGroupDescription = class
    inherit GroupDescription
Public Class PropertyGroupDescription
Inherits GroupDescription
Inheritance
PropertyGroupDescriptionPropertyGroupDescriptionPropertyGroupDescriptionPropertyGroupDescription

Remarks

Views support the functionality of grouping, which allows the user to partition the collection in the collection view into logical groups. The groups can be explicit, where the user supplies a list of groups, or implicit, where the groups are generated dynamically depending on the data.

PropertyGroupDescription allows you to create implicit groups based on a PropertyName. If you simply want to group by a property you can set the PropertyName property. If you want to change the value that is eventually used for group you can use the Converter property to supply a value converter. For example, you may want to group items based on the first letter of a name. If the PropertyName property is not set, the item itself is passed to the value converter. The converter may return a collection, which indicates the items can appear in more than one group.

You can also define how string comparison should take place using the StringComparison property.

Constructors

PropertyGroupDescription() PropertyGroupDescription() PropertyGroupDescription() PropertyGroupDescription()

Initializes a new instance of the PropertyGroupDescription class.

PropertyGroupDescription(String) PropertyGroupDescription(String) PropertyGroupDescription(String) PropertyGroupDescription(String)

Initializes a new instance of the PropertyGroupDescription class with the specified property name.

PropertyGroupDescription(String, IValueConverter) PropertyGroupDescription(String, IValueConverter) PropertyGroupDescription(String, IValueConverter) PropertyGroupDescription(String, IValueConverter)

Initializes a new instance of the PropertyGroupDescription class with the specified property name and converter.

PropertyGroupDescription(String, IValueConverter, StringComparison) PropertyGroupDescription(String, IValueConverter, StringComparison) PropertyGroupDescription(String, IValueConverter, StringComparison) PropertyGroupDescription(String, IValueConverter, StringComparison)

Initializes a new instance of the PropertyGroupDescription class with the specified parameters.

Properties

CompareNameAscending CompareNameAscending CompareNameAscending CompareNameAscending

Gets an IComparer value that orders groups in ascending order of name.

CompareNameDescending CompareNameDescending CompareNameDescending CompareNameDescending

Gets an IComparer value that orders groups in descending order of name.

Converter Converter Converter Converter

Gets or sets a converter to apply to the property value or the item to produce the final value that is used to determine which group(s) an item belongs to.

CustomSort CustomSort CustomSort CustomSort

Gets or sets a custom comparer that sorts groups using an object that implements IComparer.

(Inherited from GroupDescription)
GroupNames GroupNames GroupNames GroupNames

Gets the collection of names that are used to initialize a group with a set of subgroups with the given names.

(Inherited from GroupDescription)
PropertyName PropertyName PropertyName PropertyName

Gets or sets the name of the property that is used to determine which group(s) an item belongs to.

SortDescriptions SortDescriptions SortDescriptions SortDescriptions

Gets the collection of sort criteria in which to sort the groups.

(Inherited from GroupDescription)
StringComparison StringComparison StringComparison StringComparison

Gets or sets a StringComparison value that specifies the comparison between the value of an item (as determined by PropertyName and Converter) and the name of a group.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GroupNameFromItem(Object, Int32, CultureInfo) GroupNameFromItem(Object, Int32, CultureInfo) GroupNameFromItem(Object, Int32, CultureInfo) GroupNameFromItem(Object, Int32, CultureInfo)

Returns the group name(s) for the given item.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
NamesMatch(Object, Object) NamesMatch(Object, Object) NamesMatch(Object, Object) NamesMatch(Object, Object)

Returns a value that indicates whether the group name and the item name match so that the item belongs to the group.

OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs) OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event.

(Inherited from GroupDescription)
ShouldSerializeGroupNames() ShouldSerializeGroupNames() ShouldSerializeGroupNames() ShouldSerializeGroupNames()

Returns whether serialization processes should serialize the effective value of the GroupNames property on instances of this class.

(Inherited from GroupDescription)
ShouldSerializeSortDescriptions() ShouldSerializeSortDescriptions() ShouldSerializeSortDescriptions() ShouldSerializeSortDescriptions()

Returns whether serialization processes should serialize the effective value of the SortDescriptions property on instances of this class.

(Inherited from GroupDescription)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged INotifyPropertyChanged.PropertyChanged

Occurs when a property value changes.

(Inherited from GroupDescription)
PropertyChanged PropertyChanged PropertyChanged PropertyChanged

Occurs when a property value changes.

(Inherited from GroupDescription)

Applies to