Bewerken

Delen via


PropertyGroupDescription Constructors

Definition

Initializes a new instance of the PropertyGroupDescription class.

Overloads

PropertyGroupDescription()

Initializes a new instance of the PropertyGroupDescription class.

PropertyGroupDescription(String)

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

PropertyGroupDescription(String, IValueConverter)

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

PropertyGroupDescription(String, IValueConverter, StringComparison)

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

PropertyGroupDescription()

Initializes a new instance of the PropertyGroupDescription class.

public:
 PropertyGroupDescription();
public PropertyGroupDescription ();
Public Sub New ()

Examples

The following example shows how to use this constructor.

// This groups the items in the view by the property "Category"
PropertyGroupDescription groupDescription = new PropertyGroupDescription();
groupDescription.PropertyName = "Category";
listingDataView.GroupDescriptions.Add(groupDescription);
'This groups by property "Category"
Dim groupDescription As PropertyGroupDescription = New PropertyGroupDescription
groupDescription.PropertyName = "Category"
listingDataView.GroupDescriptions.Add(groupDescription)

For the complete example see Data Binding Demo.

Applies to

PropertyGroupDescription(String)

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

public:
 PropertyGroupDescription(System::String ^ propertyName);
public PropertyGroupDescription (string propertyName);
new System.Windows.Data.PropertyGroupDescription : string -> System.Windows.Data.PropertyGroupDescription
Public Sub New (propertyName As String)

Parameters

propertyName
String

The name of the property that specifies which group an item belongs to.

Applies to

PropertyGroupDescription(String, IValueConverter)

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

public:
 PropertyGroupDescription(System::String ^ propertyName, System::Windows::Data::IValueConverter ^ converter);
public PropertyGroupDescription (string propertyName, System.Windows.Data.IValueConverter converter);
new System.Windows.Data.PropertyGroupDescription : string * System.Windows.Data.IValueConverter -> System.Windows.Data.PropertyGroupDescription
Public Sub New (propertyName As String, converter As IValueConverter)

Parameters

propertyName
String

The name of the property that specifies which group an item belongs to. If this is null, the item itself is passed to the value converter.

converter
IValueConverter

An IValueConverter object 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. The converter may return a collection, which indicates the items can appear in more than one group.

Applies to

PropertyGroupDescription(String, IValueConverter, StringComparison)

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

public:
 PropertyGroupDescription(System::String ^ propertyName, System::Windows::Data::IValueConverter ^ converter, StringComparison stringComparison);
public PropertyGroupDescription (string propertyName, System.Windows.Data.IValueConverter converter, StringComparison stringComparison);
new System.Windows.Data.PropertyGroupDescription : string * System.Windows.Data.IValueConverter * StringComparison -> System.Windows.Data.PropertyGroupDescription
Public Sub New (propertyName As String, converter As IValueConverter, stringComparison As StringComparison)

Parameters

propertyName
String

The name of the property that specifies which group an item belongs to. If this is null, the item itself is passed to the value converter.

converter
IValueConverter

An IValueConverter object 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. The converter may return a collection, which indicates the items can appear in more than one group.

stringComparison
StringComparison

A StringComparison value that specifies the comparison between the value of an item and the name of a group.

Applies to