PropertyGroupDescription 建構函式

定義

初始化 PropertyGroupDescription 類別的新執行個體。

多載

PropertyGroupDescription()

初始化 PropertyGroupDescription 類別的新執行個體。

PropertyGroupDescription(String)

使用指定的屬性名稱,初始化 PropertyGroupDescription 類別的新執行個體。

PropertyGroupDescription(String, IValueConverter)

使用指定的屬性名稱和轉換器,初始化 PropertyGroupDescription 類別的新執行個體。

PropertyGroupDescription(String, IValueConverter, StringComparison)

使用指定的參數,初始化 PropertyGroupDescription 類別的新執行個體。

PropertyGroupDescription()

初始化 PropertyGroupDescription 類別的新執行個體。

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

範例

下列範例將示範如何使用這個建構函式。

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

如需完整範例,請參閱 資料系結示範

適用於

PropertyGroupDescription(String)

使用指定的屬性名稱,初始化 PropertyGroupDescription 類別的新執行個體。

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)

參數

propertyName
String

屬性名稱,指定項目屬於哪個群組。

適用於

PropertyGroupDescription(String, IValueConverter)

使用指定的屬性名稱和轉換器,初始化 PropertyGroupDescription 類別的新執行個體。

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)

參數

propertyName
String

屬性名稱,指定項目屬於哪個群組。 如果這是 null,則會將項目本身傳遞至值轉換器。

converter
IValueConverter

要套用至屬性值或項目的 IValueConverter 物件,以產生用來決定項目所屬群組的最終值。 轉換器可能會傳回集合,這個集合表示項目可以出現在多個群組中。

適用於

PropertyGroupDescription(String, IValueConverter, StringComparison)

使用指定的參數,初始化 PropertyGroupDescription 類別的新執行個體。

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)

參數

propertyName
String

屬性名稱,指定項目屬於哪個群組。 如果這是 null,則會將項目本身傳遞至值轉換器。

converter
IValueConverter

要套用至屬性值或項目的 IValueConverter 物件,以產生用來決定項目所屬群組的最終值。 轉換器可能會傳回集合,這個集合表示項目可以出現在多個群組中。

stringComparison
StringComparison

StringComparison 值,這個值指定項目值與群組名稱之間的比較。

適用於