共用方式為


ListBindingHelper.GetListItemProperties 方法

定義

傳回 PropertyDescriptorCollection,其中描述清單中所包含之項目或清單本身的屬性。

多載

GetListItemProperties(Object)

傳回 PropertyDescriptorCollection,其中描述指定之資料來源中包含的項目型別屬性,或指定之資料來源的屬性。

GetListItemProperties(Object, PropertyDescriptor[])

傳回 PropertyDescriptorCollection,其中描述資料來源之集合屬性中所包含的項目型別屬性。 使用指定的 PropertyDescriptor 陣列,表示要檢查哪些屬性。

GetListItemProperties(Object, String, PropertyDescriptor[])

傳回 PropertyDescriptorCollection,其中描述資料來源之指定資料成員中所包含的項目型別屬性。 使用指定的 PropertyDescriptor 陣列,表示要檢查哪些屬性。

GetListItemProperties(Object)

傳回 PropertyDescriptorCollection,其中描述指定之資料來源中包含的項目型別屬性,或指定之資料來源的屬性。

public:
 static System::ComponentModel::PropertyDescriptorCollection ^ GetListItemProperties(System::Object ^ list);
public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object list);
static member GetListItemProperties : obj -> System.ComponentModel.PropertyDescriptorCollection
Public Shared Function GetListItemProperties (list As Object) As PropertyDescriptorCollection

參數

list
Object

要檢查屬性資訊的資料來源。

傳回

PropertyDescriptorCollection

PropertyDescriptorCollection 包含 中 list 所含專案的屬性,或 的屬性 list

備註

方法 GetListItemProperties 可用來檢查資料來源的屬性集合。 這個方法的動作取決於參數的實際類型 list ,如下表所示:

參數類型 動作
屬於專案清單或集合的類型。 傳回 , PropertyDescriptorCollection 描述清單中所包含的專案型別屬性。
不是清單或集合的類型。 PropertyDescriptorCollection 回描述型別屬性的 。
null 傳回空的 PropertyDescriptorCollection

另請參閱

適用於

GetListItemProperties(Object, PropertyDescriptor[])

傳回 PropertyDescriptorCollection,其中描述資料來源之集合屬性中所包含的項目型別屬性。 使用指定的 PropertyDescriptor 陣列,表示要檢查哪些屬性。

public:
 static System::ComponentModel::PropertyDescriptorCollection ^ GetListItemProperties(System::Object ^ list, cli::array <System::ComponentModel::PropertyDescriptor ^> ^ listAccessors);
public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object list, System.ComponentModel.PropertyDescriptor[] listAccessors);
static member GetListItemProperties : obj * System.ComponentModel.PropertyDescriptor[] -> System.ComponentModel.PropertyDescriptorCollection
Public Shared Function GetListItemProperties (list As Object, listAccessors As PropertyDescriptor()) As PropertyDescriptorCollection

參數

list
Object

要檢查屬性資訊的資料來源。

listAccessors
PropertyDescriptor[]

PropertyDescriptor 陣列,其中描述要檢查資料來源的哪些屬性。 這可以是 null

傳回

PropertyDescriptorCollection

PropertyDescriptorCollection,其中描述資料來源之集合屬性中所包含的項目型別屬性。

備註

GetListItemProperties當資料來源具有專案集合的屬性,而且您需要知道集合中專案類型的屬性,而不是集合類型的屬性時,此方法會很有用。

另請參閱

適用於

GetListItemProperties(Object, String, PropertyDescriptor[])

傳回 PropertyDescriptorCollection,其中描述資料來源之指定資料成員中所包含的項目型別屬性。 使用指定的 PropertyDescriptor 陣列,表示要檢查哪些屬性。

public:
 static System::ComponentModel::PropertyDescriptorCollection ^ GetListItemProperties(System::Object ^ dataSource, System::String ^ dataMember, cli::array <System::ComponentModel::PropertyDescriptor ^> ^ listAccessors);
public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object dataSource, string dataMember, System.ComponentModel.PropertyDescriptor[] listAccessors);
static member GetListItemProperties : obj * string * System.ComponentModel.PropertyDescriptor[] -> System.ComponentModel.PropertyDescriptorCollection
Public Shared Function GetListItemProperties (dataSource As Object, dataMember As String, listAccessors As PropertyDescriptor()) As PropertyDescriptorCollection

參數

dataSource
Object

要檢查屬性資訊的資料來源。

dataMember
String

要檢查屬性資訊的選擇性資料成員。 這可以是 null

listAccessors
PropertyDescriptor[]

PropertyDescriptor 陣列,其中描述要檢查資料成員的哪些屬性。 這可以是 null

傳回

PropertyDescriptorCollection

PropertyDescriptorCollection,其中描述指定資料來源之集合屬性中所包含的項目型別屬性。

例外狀況

在指定的資料來源中找不到指定的資料成員。

備註

參數 dataMember 可以是 null ,在此情況下, GetListItemProperties 方法會使用資料來源和 PropertyDescriptor 陣列傳回屬性描述。

GetListItemProperties 當資料成員具有專案集合的屬性,而且您需要知道集合中專案類型的屬性,而不是集合類型的屬性時,會很有用。

另請參閱

適用於