WindowActivatedEventArgs Class

Definition

Contains the windows activation state information returned by the CoreWindow.Activated event.

public ref class WindowActivatedEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WindowActivatedEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WindowActivatedEventArgs
Public NotInheritable Class WindowActivatedEventArgs
Inheritance
Object Platform::Object IInspectable WindowActivatedEventArgs
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

void SetWindow(CoreWindow const & window)
{
    ...
    window.Activated({ this, &App::OnActivated });
}

// Activation event data in WindowActivatedEventArgs.
void OnActivated(Windows::UI::Core::CoreWindow const& /* sender */, Windows::UI::Core::WindowActivatedEventArgs const& /* args */) {}
// returning window activation events data through WindowActivatedEventArgs
void MyCoreWindowEvents::SetWindow( // implementation called by CoreApplication::Run(), provided for context
    _In_ CoreWindow^ window
    )
{
    // ...
    window->Activated +=
        ref new TypedEventHandler<CoreWindow^, WindowActivatedEventArgs^>(this, &CoreWindowEvents::OnWindowActivated);
    // ...
}

Remarks

This object is returned by a delegate registered for the CoreWindow.Activated event.

Note

This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).

Properties

Handled

Specifies the property that gets or sets whether the window activation event was handled.

WindowActivationState

Gets the activation state of the window at the time the Activated event was raised.

Applies to

See also