WindowActivatedEventArgs Classe

Définition

Contient les informations d’état d’activation windows retournées par l’événement CoreWindow.Activated .

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
Héritage
Object Platform::Object IInspectable WindowActivatedEventArgs
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Exemples

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

Remarques

Cet objet est retourné par un délégué inscrit pour l’événement CoreWindow.Activated .

Notes

Cette classe n’est pas agile, ce qui signifie que vous devez prendre en compte son modèle de thread et son comportement de marshaling. Pour plus d’informations, consultez Threading and Marshaling (C++/CX) .

Propriétés

Handled

Spécifie la propriété qui obtient ou définit si l’événement d’activation de fenêtre a été géré.

WindowActivationState

Obtient l’état d’activation de la fenêtre au moment où l’événement Activated a été déclenché.

S’applique à

Voir aussi