PropertyStoreTriggerEventT Method |
Triggers an event with the specified key
Namespace:
Eto
Assembly:
Eto (in Eto.dll) Version: 2.5.3-dev
Syntax public void TriggerEvent<T>(
Object key,
Object sender,
T args
)
where T : EventArgs
Public Sub TriggerEvent(Of T As EventArgs) (
key As Object,
sender As Object,
args As T
)
member TriggerEvent :
key : Object *
sender : Object *
args : 'T -> unit when 'T : EventArgs
Parameters
- key
- Type: SystemObject
Key of the generic or handler event - sender
- Type: SystemObject
Object sending the event (usually 'this') - args
- Type: T
Arguments for the event
Type Parameters
- T
- Type of the event arguments
Remarks
Call this in your OnMyEvent(EventArgs) method to trigger the event if it has been subscribed to.
This can handle events that have any type of EventArgs.
Examples
This shows how to trigger either a generic event or handler-triggered event:
protected virtual void OnMySomething(EventArgs e)
{
Properties.TriggerEvent(MySomethingEventKey, this, e);
}
See Also