WindowActivatedEventArgs WindowActivatedEventArgs WindowActivatedEventArgs WindowActivatedEventArgs Class


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

public : sealed class WindowActivatedEventArgs : ICoreWindowEventArgs, IWindowActivatedEventArgs
struct winrt::Windows::UI::Core::WindowActivatedEventArgs : ICoreWindowEventArgs, IWindowActivatedEventArgs
public sealed class WindowActivatedEventArgs : ICoreWindowEventArgs, IWindowActivatedEventArgs
Public NotInheritable Class WindowActivatedEventArgs Implements ICoreWindowEventArgs, IWindowActivatedEventArgs
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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);
    // ...


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


: 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).


Handled Handled Handled Handled

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

WindowActivationState WindowActivationState WindowActivationState WindowActivationState

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

See Also