Redigeeri

Jagamisviis:


PropertyDescriptor.GetChildProperties Method

Definition

Overloads

GetChildProperties()

Returns the default PropertyDescriptorCollection.

GetChildProperties(Attribute[])

Returns a PropertyDescriptorCollection using a specified array of attributes as a filter.

GetChildProperties(Object)

Returns a PropertyDescriptorCollection for a given object.

GetChildProperties(Object, Attribute[])

Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter.

GetChildProperties()

Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs

Returns the default PropertyDescriptorCollection.

public:
 System::ComponentModel::PropertyDescriptorCollection ^ GetChildProperties();
public System.ComponentModel.PropertyDescriptorCollection GetChildProperties ();
member this.GetChildProperties : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetChildProperties () As PropertyDescriptorCollection

Returns

A collection of property descriptor.

Remarks

This method passes null for both the instance parameter and the filter parameter.

The properties for the instance parameter can differ from the properties of a class, because the container can add or remove properties if the instance parameter is sited.

The filter parameter can mix Type and Attribute objects. Filtering is defined by the following rules:

  • A Type object is treated as a wildcard; it matches any property that has the Type in its set of attributes.

  • If a property does not have an Attribute of the same class, the property will not be included in the returned array.

  • If the attribute is an instance of Attribute, the property must be an exact match to be included in the returned array.

  • If you specify an Attribute and it is the default property, it will be included in the returned array, even if there is no instance of Attribute in the property.

See also

Applies to

GetChildProperties(Attribute[])

Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs

Returns a PropertyDescriptorCollection using a specified array of attributes as a filter.

public:
 System::ComponentModel::PropertyDescriptorCollection ^ GetChildProperties(cli::array <Attribute ^> ^ filter);
public System.ComponentModel.PropertyDescriptorCollection GetChildProperties (Attribute[] filter);
member this.GetChildProperties : Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetChildProperties (filter As Attribute()) As PropertyDescriptorCollection

Parameters

filter
Attribute[]

An array of type Attribute to use as a filter.

Returns

A PropertyDescriptorCollection with the properties that match the specified attributes.

Remarks

This method passes null for the instance parameter.

The properties for the instance parameter can differ from the properties of a class, because the site can add or remove properties if the instance parameter is sited.

The filter parameter can mix Type and Attribute objects. Filtering is defined by the following rules:

  • A Type object is treated as a wildcard; it matches any property that has the Type in its set of attributes.

  • If a property does not have an Attribute of the same class, the property will not be included in the returned array.

  • If the attribute is an instance of Attribute, the property must be an exact match to be included in the returned array.

  • If you specify an Attribute instance and it is the default property, it will be included in the returned array even if there is no instance of the Attribute in the property.

See also

Applies to

GetChildProperties(Object)

Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs

Returns a PropertyDescriptorCollection for a given object.

public:
 System::ComponentModel::PropertyDescriptorCollection ^ GetChildProperties(System::Object ^ instance);
public System.ComponentModel.PropertyDescriptorCollection GetChildProperties (object instance);
member this.GetChildProperties : obj -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetChildProperties (instance As Object) As PropertyDescriptorCollection

Parameters

instance
Object

A component to get the properties for.

Returns

A PropertyDescriptorCollection with the properties for the specified component.

Remarks

This method passes null for the filter parameter.

The properties for the instance parameter can differ from the properties of a class, because the site can add or remove properties if the instance parameter is sited.

The filter parameter can mix Type and Attribute objects. Filtering is defined by the following rules:

  • A Type object is treated as a wildcard; it matches any property that has the Type in its set of attributes.

  • If a property does not have an Attribute of the same class, the property will not be included in the returned array.

  • If the attribute is an instance of Attribute, the property must be an exact match to be included in the returned array.

  • If you specify an Attribute instance and it is the default property, it will be included in the returned array even if there is no instance of the Attribute in the property.

See also

Applies to

GetChildProperties(Object, Attribute[])

Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs
Source:
PropertyDescriptor.cs

Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter.

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetChildProperties(System::Object ^ instance, cli::array <Attribute ^> ^ filter);
public virtual System.ComponentModel.PropertyDescriptorCollection GetChildProperties (object instance, Attribute[] filter);
public virtual System.ComponentModel.PropertyDescriptorCollection GetChildProperties (object? instance, Attribute[]? filter);
abstract member GetChildProperties : obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
override this.GetChildProperties : obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function GetChildProperties (instance As Object, filter As Attribute()) As PropertyDescriptorCollection

Parameters

instance
Object

A component to get the properties for.

filter
Attribute[]

An array of type Attribute to use as a filter.

Returns

A PropertyDescriptorCollection with the properties that match the specified attributes for the specified component.

Remarks

The properties for the instance parameter can differ from the properties of a class, because the site can add or remove properties if the instance parameter is sited.

The filter parameter can mix Type and Attribute objects. Filtering is defined by the following rules:

  • A Type object is treated as a wildcard; it matches any property that has the Type in its set of attributes.

  • If a property does not have an Attribute of the same class, the property will not be included in the returned array.

  • If the attribute is an instance of Attribute, the property must be an exact match to be included in the returned array.

  • If you specify an Attribute instance and it is the default property, it will be included in the returned array even if there is no instance of the Attribute in the property.

Generally, child properties should be returned by implementing the GetProperties member of the TypeConverter returned from this property.

See also

Applies to