EventHandler<T> delegate

EventHandler<T> delegate

Represents a method that handles general events.

.NET:  This type appears as System.EventHandler<TEventArgs>.

Syntax


public delegate void EventHandler(
  Object^ sender, 
  T args
)

Parameters

sender

Type: Object [JavaScript] | Platform::Object [C++]

The event source.

args

Type: T

The event data.

Remarks

When programming with .NET, this class is hidden and developers should use the System.EventHandler<TEventArgs> class. Existing Windows Runtime events have an event data type constraint for TEventArgs, so use that event-data type if you need the event data in your specific handler implementation.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

See also

System.EventHandler<TEventArgs>
Events and routed events overview

 

 

Show:
© 2016 Microsoft