PropertyDescriptor.GetChildProperties 方法

定義

多載

GetChildProperties()

傳回預設的 PropertyDescriptorCollection

GetChildProperties(Attribute[])

使用指定的屬性陣列做為篩選條件,傳回 PropertyDescriptorCollection

GetChildProperties(Object)

傳回指定物件的 PropertyDescriptorCollection

GetChildProperties(Object, Attribute[])

使用指定的屬性陣列做為篩選條件,傳回指定物件的 PropertyDescriptorCollection

GetChildProperties()

來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs

傳回預設的 PropertyDescriptorCollection

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

傳回

屬性描述元的集合。

備註

這個方法會針對 instance 參數和 filter 參數傳遞null

參數的屬性可能與類別的屬性 instance 不同,因為如果 instance 參數已月臺,容器可以新增或移除屬性。

參數 filter 可以混合 TypeAttribute 物件。 篩選是由下列規則所定義:

  • Type物件會被視為通配符;它會比對在其一組屬性中具有 Type 的任何屬性。

  • 如果屬性沒有 Attribute 相同類別的 ,則屬性將不會包含在傳回的陣列中。

  • 如果 屬性是的 Attribute實例,則 屬性必須是完全相符專案,才能包含在傳回的陣列中。

  • 如果您指定 Attribute ,而且它是預設屬性,則會包含在傳回的陣列中,即使屬性中沒有的實例 Attribute 也一樣。

另請參閱

適用於

GetChildProperties(Attribute[])

來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs

使用指定的屬性陣列做為篩選條件,傳回 PropertyDescriptorCollection

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

參數

filter
Attribute[]

做為篩選條件使用的 Attribute 類型陣列。

傳回

PropertyDescriptorCollection,具有與指定屬性 (Attribute) 相符的屬性 (Property)。

備註

這個方法會針對 instance 參數傳遞null

參數的屬性可能與類別的屬性 instance 不同,因為如果 instance 參數已月臺,月臺可以新增或移除屬性。

參數 filter 可以混合 TypeAttribute 物件。 篩選是由下列規則所定義:

  • Type物件會被視為通配符;它會比對在其一組屬性中具有 Type 的任何屬性。

  • 如果屬性沒有 Attribute 相同類別的 ,則屬性將不會包含在傳回的陣列中。

  • 如果 屬性是的 Attribute實例,則 屬性必須是完全相符專案,才能包含在傳回的陣列中。

  • 如果您指定 Attribute 實例,而且它是默認屬性,即使 屬性中沒有的實例 Attribute ,它也會包含在傳回的陣列中。

另請參閱

適用於

GetChildProperties(Object)

來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs

傳回指定物件的 PropertyDescriptorCollection

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

參數

instance
Object

要為其取得屬性的元件。

傳回

具有指定元件之屬性的 PropertyDescriptorCollection

備註

這個方法會針對 filter 參數傳遞null

參數的屬性可能與類別的屬性 instance 不同,因為如果 instance 參數已月臺,月臺可以新增或移除屬性。

參數 filter 可以混合 TypeAttribute 物件。 篩選是由下列規則所定義:

  • Type物件會被視為通配符;它會比對在其一組屬性中具有 Type 的任何屬性。

  • 如果屬性沒有 Attribute 相同類別的 ,則屬性將不會包含在傳回的陣列中。

  • 如果 屬性是的 Attribute實例,則 屬性必須是完全相符專案,才能包含在傳回的陣列中。

  • 如果您指定 Attribute 實例,而且它是默認屬性,即使 屬性中沒有的實例 Attribute ,它也會包含在傳回的陣列中。

另請參閱

適用於

GetChildProperties(Object, Attribute[])

來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs
來源:
PropertyDescriptor.cs

使用指定的屬性陣列做為篩選條件,傳回指定物件的 PropertyDescriptorCollection

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

參數

instance
Object

要為其取得屬性的元件。

filter
Attribute[]

做為篩選條件使用的 Attribute 類型陣列。

傳回

PropertyDescriptorCollection,其屬性 (Property) 符合指定元件的指定屬性 (Attribute)。

備註

參數的屬性可能與類別的屬性 instance 不同,因為如果 instance 參數已月臺,月臺可以新增或移除屬性。

參數 filter 可以混合 TypeAttribute 物件。 篩選是由下列規則所定義:

  • Type物件會被視為通配符;它會比對在其一組屬性中具有 Type 的任何屬性。

  • 如果屬性沒有 Attribute 相同類別的 ,則屬性將不會包含在傳回的陣列中。

  • 如果 屬性是的 Attribute實例,則 屬性必須是完全相符專案,才能包含在傳回的陣列中。

  • 如果您指定 Attribute 實例,而且它是默認屬性,即使 屬性中沒有的實例 Attribute ,它也會包含在傳回的陣列中。

一般而言,應該藉由實 GetProperties 作從這個屬性傳回之 TypeConverter 的成員來傳回子屬性。

另請參閱

適用於