TypeDescriptor.GetDefaultProperty Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne la propriété par défaut d’un composant.
Surcharges
| Nom | Description |
|---|---|
| GetDefaultProperty(Object, Boolean) |
Retourne la propriété par défaut du composant spécifié avec un descripteur de type personnalisé. |
| GetDefaultProperty(Object) |
Retourne la propriété par défaut du composant spécifié. |
| GetDefaultProperty(Type) |
Retourne la propriété par défaut pour le type de composant spécifié. |
GetDefaultProperty(Object, Boolean)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Retourne la propriété par défaut du composant spécifié avec un descripteur de type personnalisé.
public:
static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component, bool noCustomTypeDesc);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")>]
static member GetDefaultProperty : obj * bool -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : obj * bool -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object, noCustomTypeDesc As Boolean) As PropertyDescriptor
Paramètres
- component
- Object
Composant pour lequel obtenir la propriété par défaut.
- noCustomTypeDesc
- Boolean
true pour ne pas prendre en compte les informations de description de type personnalisées ; sinon, false.
Retours
Avec PropertyDescriptor la propriété par défaut, ou null s’il n’y a pas de propriétés.
- Attributs
Exceptions
component est un objet distant interprocesseur.
Remarques
Si le component paramètre est null, cette méthode retourne null.
Voir aussi
- DefaultPropertyAttribute
- PropertyDescriptor
- ICustomTypeDescriptor
- CreateProperty
- GetProperties
- GetDefaultEvent
S’applique à
GetDefaultProperty(Object)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Retourne la propriété par défaut du composant spécifié.
public:
static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")>]
static member GetDefaultProperty : obj -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : obj -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object) As PropertyDescriptor
Paramètres
- component
- Object
Composant pour lequel obtenir la propriété par défaut.
Retours
Avec PropertyDescriptor la propriété par défaut, ou null s’il n’y a pas de propriétés.
- Attributs
Exceptions
component est un objet distant interprocesseur.
Remarques
Si le component paramètre est null, cette méthode retourne null.
Voir aussi
S’applique à
GetDefaultProperty(Type)
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
- Source:
- TypeDescriptor.cs
Retourne la propriété par défaut pour le type de composant spécifié.
public:
static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(Type ^ componentType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(Type componentType);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(Type componentType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member GetDefaultProperty : Type -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : Type -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (componentType As Type) As PropertyDescriptor
Paramètres
Retours
Avec PropertyDescriptor la propriété par défaut, ou null s’il n’y a pas de propriétés.
- Attributs
Remarques
Appelez cette version de cette méthode uniquement lorsque vous n’avez pas d’instance de l’objet.
Si le componentType paramètre est null, cette méthode retourne null.