TypeDescriptor.GetDefaultEvent Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Returnerar standardhändelsen för en komponent eller typ.
Överlagringar
| Name | Description |
|---|---|
| GetDefaultEvent(Object) |
Returnerar standardhändelsen för den angivna komponenten. |
| GetDefaultEvent(Type) |
Returnerar standardhändelsen för den angivna komponenttypen. |
| GetDefaultEvent(Object, Boolean) |
Returnerar standardhändelsen för en komponent med en anpassad typbeskrivning. |
GetDefaultEvent(Object)
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
Returnerar standardhändelsen för den angivna komponenten.
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
Parametrar
- component
- Object
Komponenten som händelsen ska hämtas för.
Returer
En EventDescriptor med standardhändelsen eller null om det inte finns några händelser.
- Attribut
Undantag
component är null.
component är ett fjärrobjekt mellan processer.
Kommentarer
Den här metoden motsvarar den överlagrade GetDefaultEvent(Object, Boolean) metoden med en andra parameter av false.
Se även
- DefaultEventAttribute
- EventDescriptor
- GetDefaultEvent()
- GetEvents
- CreateEvent
- GetAttributes
- GetProperties
- GetDefaultProperty
Gäller för
GetDefaultEvent(Type)
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
Returnerar standardhändelsen för den angivna komponenttypen.
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
Parametrar
Returer
En EventDescriptor med standardhändelsen eller null om det inte finns några händelser.
- Attribut
Undantag
componentType är null.
Kommentarer
Anropa endast den här versionen av den här metoden när du inte har någon instans av objektet.
Se även
- DefaultEventAttribute
- EventDescriptor
- GetDefaultEvent()
- GetEvents
- CreateEvent
- GetAttributes
- GetProperties
- GetDefaultProperty
Gäller för
GetDefaultEvent(Object, Boolean)
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
- Källa:
- TypeDescriptor.cs
Returnerar standardhändelsen för en komponent med en anpassad typbeskrivning.
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
Parametrar
- component
- Object
Komponenten som händelsen ska hämtas för.
- noCustomTypeDesc
- Boolean
trueför att inte ta hänsyn till information om beskrivning av anpassad typ. annars . false
Returer
En EventDescriptor med standardhändelsen eller null om det inte finns några händelser.
- Attribut
Undantag
component är null.
component är ett fjärrobjekt mellan processer.
Se även
- DefaultEventAttribute
- EventDescriptor
- ICustomTypeDescriptor
- GetDefaultEvent()
- GetEvents
- CreateEvent
- GetAttributes
- GetProperties
- GetDefaultProperty