TypeDescriptor.GetDefaultEvent Método

Definição

Devolve o evento padrão para um componente ou tipo.

Sobrecargas

Name Description
GetDefaultEvent(Object)

Devolve o evento predefinido para o componente especificado.

GetDefaultEvent(Type)

Devolve o evento padrão para o tipo de componente especificado.

GetDefaultEvent(Object, Boolean)

Devolve o evento predefinido de um componente com um descritor de tipo personalizado.

GetDefaultEvent(Object)

Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs

Devolve o evento predefinido para o componente especificado.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")>]
static member GetDefaultEvent : obj -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : obj -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object) As EventDescriptor

Parâmetros

component
Object

O componente para obter o evento.

Devoluções

E EventDescriptor com o evento padrão, ou null se não houver eventos.

Atributos

Exceções

component é null.

component é um objeto remoto de processo cruzado.

Observações

Este método é equivalente ao método sobrecarregado GetDefaultEvent(Object, Boolean) com um segundo parâmetro de false.

Ver também

Aplica-se a

GetDefaultEvent(Type)

Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs

Devolve o evento padrão para o tipo de componente especificado.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(Type ^ componentType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(Type componentType);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(Type componentType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")>]
static member GetDefaultEvent : Type -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : Type -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (componentType As Type) As EventDescriptor

Parâmetros

componentType
Type

O Type do componente alvo.

Devoluções

E EventDescriptor com o evento padrão, ou null se não houver eventos.

Atributos

Exceções

componentType é null.

Observações

Chame esta versão deste método apenas quando não tiver uma instância do objeto.

Ver também

Aplica-se a

GetDefaultEvent(Object, Boolean)

Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs
Origem:
TypeDescriptor.cs

Devolve o evento predefinido de um componente com um descritor de tipo personalizado.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")>]
static member GetDefaultEvent : obj * bool -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : obj * bool -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object, noCustomTypeDesc As Boolean) As EventDescriptor

Parâmetros

component
Object

O componente para obter o evento.

noCustomTypeDesc
Boolean

true não considerar informações personalizadas de descrição de tipo; caso contrário, false.

Devoluções

E EventDescriptor com o evento padrão, ou null se não houver eventos.

Atributos

Exceções

component é null.

component é um objeto remoto de processo cruzado.

Ver também

Aplica-se a