ListBindingHelper.GetListItemProperties 方法

定义

返回一个 PropertyDescriptorCollection 描述列表或列表本身中包含的项的属性。

重载

名称 说明
GetListItemProperties(Object)

返回 PropertyDescriptorCollection 描述指定数据源中包含的项类型的属性或指定数据源的属性。

GetListItemProperties(Object, PropertyDescriptor[])

返回 PropertyDescriptorCollection 描述数据源集合属性中包含的项类型的属性。 使用指定的 PropertyDescriptor 数组来指示要检查的属性。

GetListItemProperties(Object, String, PropertyDescriptor[])

返回 PropertyDescriptorCollection 描述数据源的指定数据成员中包含的项类型的属性。 使用指定的 PropertyDescriptor 数组来指示要检查的属性。

GetListItemProperties(Object)

Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs

返回 PropertyDescriptorCollection 描述指定数据源中包含的项类型的属性或指定数据源的属性。

public:
 static System::ComponentModel::PropertyDescriptorCollection ^ GetListItemProperties(System::Object ^ list);
public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties(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包含的项list的属性或属性list

注解

该方法 GetListItemProperties 用于检查数据源的属性集合。 此方法的操作取决于下表中参数的实际类型 list

参数类型 Action
是项列表或集合的类型。 返回一个 PropertyDescriptorCollection 描述列表中所包含的项类型的属性。
不是列表或集合的类型。 返回一个 PropertyDescriptorCollection 描述类型的属性。
null 返回一个空 PropertyDescriptorCollection

另请参阅

适用于

GetListItemProperties(Object, PropertyDescriptor[])

Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs

返回 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);
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 数据源的集合属性中包含的项类型的属性。

注解

当数据源具有作为项集合的属性,并且你需要知道集合中项类型的属性,而不是集合类型的属性时,此方法 GetListItemProperties 非常有用。

另请参阅

适用于

GetListItemProperties(Object, String, PropertyDescriptor[])

Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs
Source:
ListBindingHelper.cs

返回 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);
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 指定数据源的集合属性中包含的项类型的属性。

例外

在指定的数据源中找不到指定的数据成员。

注解

参数 dataMember 可以是 null,在这种情况下, GetListItemProperties 该方法将使用数据源和 PropertyDescriptor 数组返回属性说明。

GetListItemProperties 当数据成员具有作为项集合的属性,并且你需要知道集合中项类型的属性,而不是集合类型的属性时,非常有用。

另请参阅

适用于