Class PropertyGroupDescription
Describes the grouping of items by using a property name as the criteria.
Implements
Inherited Members
Namespace: System.Windows.Data
Assembly: OpenSilver.dll
Syntax
public class PropertyGroupDescription : GroupDescription, INotifyPropertyChanged
Constructors
| Improve this Doc View SourcePropertyGroupDescription()
Initializes a new instance of the PropertyGroupDescription class.
Declaration
public PropertyGroupDescription()
PropertyGroupDescription(String)
Initializes a new instance of the PropertyGroupDescription class with the specified property name.
Declaration
public PropertyGroupDescription(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property that specifies which group an item belongs to. |
PropertyGroupDescription(String, IValueConverter)
Initializes a new instance of the PropertyGroupDescription class with the specified property name and converter.
Declaration
public PropertyGroupDescription(string propertyName, IValueConverter converter)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property that specifies which group an item belongs to. If this parameter is null, the item itself is passed to the value converter. |
IValueConverter | converter | 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 that the items can appear in more than one group. |
PropertyGroupDescription(String, IValueConverter, StringComparison)
Initializes a new instance of the PropertyGroupDescription class with the specified property name, converter, and string comparison.
Declaration
public PropertyGroupDescription(string propertyName, IValueConverter converter, StringComparison stringComparison)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property that specifies which group an item belongs to. If this parameter is null, the item itself is passed to the value converter. |
IValueConverter | converter | 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 that the items can appear in more than one group. |
System.StringComparison | stringComparison | A StringComparison value that specifies the comparison between the value of an item and the name of a group. |
Properties
| Improve this Doc View SourceConverter
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.
Declaration
public IValueConverter Converter { get; set; }
Property Value
Type | Description |
---|---|
IValueConverter | The converter to apply. The default is null. |
PropertyName
Gets or sets the name of the property that is used to determine which group(s) an item belongs to.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the property that is used to determine which group(s) an item belongs to. The default is null. |
StringComparison
Gets or sets a System.StringComparison value that specifies the comparison between the value of an item (as determined by PropertyName and Converter) and the name of a group.
Declaration
public StringComparison StringComparison { get; set; }
Property Value
Type | Description |
---|---|
System.StringComparison | An enumeration value that specifies the comparison between the value of an item and the name of a group. The default is System.StringComparison.Ordinal. |
Methods
| Improve this Doc View SourceGroupNameFromItem(Object, Int32, CultureInfo)
Returns the group name(s) for the specified item.
Declaration
public override object GroupNameFromItem(object item, int level, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item to return group names for. |
System.Int32 | level | The level of grouping. |
System.Globalization.CultureInfo | culture | The System.Globalization.CultureInfo to supply to the converter. |
Returns
Type | Description |
---|---|
System.Object | The group name(s) for the specified item. |
Overrides
| Improve this Doc View SourceNamesMatch(Object, Object)
Returns a value that indicates whether the group name and the item name match, which indicates that the item belongs to the group.
Declaration
public override bool NamesMatch(object groupName, object itemName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | groupName | The name of the group to check. |
System.Object | itemName | The name of the item to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the names match, which indicates that the item belongs to the group; otherwise, false. |