ListCollectionView.GroupDescriptions プロパティ

定義

コレクション内の項目をビュー内でどのようにグループ化するかを説明する GroupDescription オブジェクトのコレクションを取得します。

public:
 virtual property System::Collections::ObjectModel::ObservableCollection<System::ComponentModel::GroupDescription ^> ^ GroupDescriptions { System::Collections::ObjectModel::ObservableCollection<System::ComponentModel::GroupDescription ^> ^ get(); };
public override System.Collections.ObjectModel.ObservableCollection<System.ComponentModel.GroupDescription> GroupDescriptions { get; }
member this.GroupDescriptions : System.Collections.ObjectModel.ObservableCollection<System.ComponentModel.GroupDescription>
Public Overrides ReadOnly Property GroupDescriptions As ObservableCollection(Of GroupDescription)

プロパティ値

ObservableCollection<GroupDescription>

コレクション内の項目をビュー内でどのようにグループ化するかを示す GroupDescription オブジェクトのコレクション。

次の例は、このプロパティを使用する方法を示しています。

// 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)

完全な例については、「 データ バインディング デモ」を参照してください。

注釈

注意

このプロパティは、コレクション オブジェクトにアクセスし、その Addさまざまなメソッドを使用することによってのみ設定できます。 コレクション オブジェクト自体にアクセスするプロパティは読み取り専用です。コレクション自体は読み取り/書き込みです。

適用対象

こちらもご覧ください