TypeDescriptor.GetDefaultEvent TypeDescriptor.GetDefaultEvent TypeDescriptor.GetDefaultEvent TypeDescriptor.GetDefaultEvent Method

Definition

Returns the default event for a component or type.

Overloads

GetDefaultEvent(Type) GetDefaultEvent(Type) GetDefaultEvent(Type) GetDefaultEvent(Type)

Returns the default event for the specified type of component.

GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean)

Returns the default event for a component with a custom type descriptor.

GetDefaultEvent(Object) GetDefaultEvent(Object) GetDefaultEvent(Object) GetDefaultEvent(Object)

Returns the default event for the specified component.

GetDefaultEvent(Type) GetDefaultEvent(Type) GetDefaultEvent(Type) GetDefaultEvent(Type)

Returns the default event for the specified type of component.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(Type ^ componentType);
public static System.ComponentModel.EventDescriptor GetDefaultEvent (Type componentType);
static member GetDefaultEvent : Type -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (componentType As Type) As EventDescriptor
Parameters
componentType
Type Type Type Type

The Type of the target component.

Returns

An EventDescriptor with the default event, or null if there are no events.

Exceptions

Remarks

Call this version of this method only when you do not have an instance of the object.

See Also

GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean) GetDefaultEvent(Object, Boolean)

Returns the default event for a component with a custom type descriptor.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptor GetDefaultEvent (object component, bool noCustomTypeDesc);
static member GetDefaultEvent : obj * bool -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object, noCustomTypeDesc As Boolean) As EventDescriptor
Parameters
component
Object Object Object Object

The component to get the event for.

noCustomTypeDesc
Boolean Boolean Boolean Boolean

true to consider custom type description information; otherwise, false.

Returns

An EventDescriptor with the default event, or null if there are no events.

Exceptions
See Also

GetDefaultEvent(Object) GetDefaultEvent(Object) GetDefaultEvent(Object) GetDefaultEvent(Object)

Returns the default event for the specified component.

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component);
public static System.ComponentModel.EventDescriptor GetDefaultEvent (object component);
static member GetDefaultEvent : obj -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object) As EventDescriptor
Parameters
component
Object Object Object Object

The component to get the event for.

Returns

An EventDescriptor with the default event, or null if there are no events.

Exceptions

Remarks

This method is equivalent to the overloaded GetDefaultEvent(Object, Boolean) method with a second parameter of false.

See Also

Applies to