Editare

Partajați prin


TypeDescriptor.CreateEvent Method

Definition

Creates a new event descriptor that is identical to an existing event descriptor.

Overloads

CreateEvent(Type, EventDescriptor, Attribute[])

Creates a new event descriptor that is identical to an existing event descriptor, when passed the existing EventDescriptor.

CreateEvent(Type, String, Type, Attribute[])

Creates a new event descriptor that is identical to an existing event descriptor by dynamically generating descriptor information from a specified event on a type.

CreateEvent(Type, EventDescriptor, Attribute[])

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Creates a new event descriptor that is identical to an existing event descriptor, when passed the existing EventDescriptor.

public:
 static System::ComponentModel::EventDescriptor ^ CreateEvent(Type ^ componentType, System::ComponentModel::EventDescriptor ^ oldEventDescriptor, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptor CreateEvent (Type componentType, System.ComponentModel.EventDescriptor oldEventDescriptor, params Attribute[] attributes);
static member CreateEvent : Type * System.ComponentModel.EventDescriptor * Attribute[] -> System.ComponentModel.EventDescriptor
Public Shared Function CreateEvent (componentType As Type, oldEventDescriptor As EventDescriptor, ParamArray attributes As Attribute()) As EventDescriptor

Parameters

componentType
Type

The type of the component for which to create the new event.

oldEventDescriptor
EventDescriptor

The existing event information.

attributes
Attribute[]

The new attributes.

Returns

A new EventDescriptor that has merged the specified metadata attributes with the existing metadata attributes.

See also

Applies to

CreateEvent(Type, String, Type, Attribute[])

Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs
Source:
TypeDescriptor.cs

Creates a new event descriptor that is identical to an existing event descriptor by dynamically generating descriptor information from a specified event on a type.

public:
 static System::ComponentModel::EventDescriptor ^ CreateEvent(Type ^ componentType, System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
public static System.ComponentModel.EventDescriptor CreateEvent (Type componentType, string name, Type type, params Attribute[] attributes);
static member CreateEvent : Type * string * Type * Attribute[] -> System.ComponentModel.EventDescriptor
Public Shared Function CreateEvent (componentType As Type, name As String, type As Type, ParamArray attributes As Attribute()) As EventDescriptor

Parameters

componentType
Type

The type of the component the event lives on.

name
String

The name of the event.

type
Type

The type of the delegate that handles the event.

attributes
Attribute[]

The attributes for this event.

Returns

An EventDescriptor that is bound to a type.

See also

Applies to