Freigeben über


PropertyGroupDescription Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

Inheritance Hierarchy

System.Object
  System.ComponentModel.GroupDescription
    System.Windows.Data.PropertyGroupDescription

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
<TypeForwardedFromAttribute("System.Windows.Data, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")> _
Public Class PropertyGroupDescription _
    Inherits GroupDescription
[TypeForwardedFromAttribute("System.Windows.Data, Version=2.0.5.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
public class PropertyGroupDescription : GroupDescription

The PropertyGroupDescription type exposes the following members.

Constructors

  Name Description
Public methodSupported by Silverlight for Windows Phone PropertyGroupDescription() Initializes a new instance of the PropertyGroupDescription class.
Public methodSupported by Silverlight for Windows Phone PropertyGroupDescription(String) Initializes a new instance of the PropertyGroupDescription class with the specified property name.
Public methodSupported by Silverlight for Windows Phone PropertyGroupDescription(String, IValueConverter) Initializes a new instance of the PropertyGroupDescription class with the specified property name and converter.
Public methodSupported by Silverlight for Windows Phone PropertyGroupDescription(String, IValueConverter, StringComparison) Initializes a new instance of the PropertyGroupDescription class with the specified property name, converter, and string comparison.

Top

Properties

  Name Description
Public propertySupported by Silverlight for Windows Phone 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.
Public propertySupported by Silverlight for Windows Phone GroupNames Gets the collection of group names. (Inherited from GroupDescription.)
Public propertySupported by Silverlight for Windows Phone PropertyName Gets or sets the name of the property that is used to determine which group(s) an item belongs to.
Public propertySupported by Silverlight for Windows Phone 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.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows Phone Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows Phone Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GroupNameFromItem Returns the group name(s) for the specified item. (Overrides GroupDescription.GroupNameFromItem(Object, Int32, CultureInfo).)
Protected methodSupported by Silverlight for Windows Phone MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone NamesMatch Returns a value that indicates whether the group name and the item name match, which indicates that the item belongs to the group. (Overrides GroupDescription.NamesMatch(Object, Object).)
Protected methodSupported by Silverlight for Windows Phone OnPropertyChanged Raises the PropertyChanged event. (Inherited from GroupDescription.)
Public methodSupported by Silverlight for Windows Phone ShouldSerializeGroupNames Indicates whether the group names should be serialized. (Inherited from GroupDescription.)
Public methodSupported by Silverlight for Windows Phone ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Protected eventSupported by Silverlight for Windows Phone PropertyChanged Occurs when a property value has changed. (Inherited from GroupDescription.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate event INotifyPropertyChanged.PropertyChanged For a description of this member, see PropertyChanged. (Inherited from GroupDescription.)

Top

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 property value. To generate groups based on a property, set the PropertyName property. To change the value that is eventually used for grouping before the groups are generated, use the Converter property to supply a value converter. For example, you might 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 can return a collection, which indicates the items can appear in more than one group.

You can also use the StringComparison property to define how string comparison should occur.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference