ComponentExtensionsGetEvents Method
Gets all the events declared in the source Component.
Namespace: DevCase.Extensions.ComponentExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static IReadOnlyCollection<EventInfo> GetEvents(
this Component component,
bool declaredOnly
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetEvents (
component As Component,
declaredOnly As Boolean
) As IReadOnlyCollection(Of EventInfo)
Dim component As Component
Dim declaredOnly As Boolean
Dim returnValue As IReadOnlyCollection(Of EventInfo)
returnValue = component.GetEvents(declaredOnly)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static IReadOnlyCollection<EventInfo^>^ GetEvents(
Component^ component,
bool declaredOnly
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetEvents :
component : Component *
declaredOnly : bool -> IReadOnlyCollection<EventInfo>
No code example is currently available or this language may not be supported.
- component Component
-
The source Component.
- declaredOnly Boolean
-
If , only events declared at the
level of the supplied type's hierarchy should be considered.
Inherited events are not considered.
IReadOnlyCollectionEventInfo
All the events declared in the source
ComponentIn Visual Basic and C#, you can call this method as an instance method on any object of type
Component. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim ctrl As New Button()
Dim events As IReadOnlyCollection(Of EventInfo) = ctrl.GetEvents(declaredOnly:=True)
For Each ev As EventInfo In events
Console.WriteLine($"Event Name: {ev.Name}")
Next
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.