CoreApplicationView CoreApplicationView CoreApplicationView CoreApplicationView Class


Represents an app window and its thread.

public : sealed class CoreApplicationView
struct winrt::Windows::ApplicationModel::Core::CoreApplicationView
public sealed class CoreApplicationView
Public NotInheritable Class CoreApplicationView

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)



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

The following code snippet demonstrates the activation of the CoreApplicationView and the associated CoreWindow in a view provider implementation.

struct App : implements<App, IFrameworkViewSource, IFrameworkView>
    void Initialize(CoreApplicationView const& applicationView)
        applicationView.Activated({this, &App::OnActivated });

    void OnActivated(CoreApplicationView const& /* applicationView */, IActivatedEventArgs const& /* args */)
        // Activate the application window, making it visible and enabling it to receive events.
ref class MyFrameworkView : public IFrameworkView
// ...
virtual void Initialize(
        _In_ CoreApplicationView^ applicationView
        applicationView->Activated +=
            ref new TypedEventHandler<CoreApplicationView^, IActivatedEventArgs^>(this, &MyFrameworkView::OnActivated);

// ...

void OnActivated(
        _In_ CoreApplicationView^ applicationView,
        _In_ IActivatedEventArgs^ args
        // Activate the application window, making it visible and enabling it to receive events.

// ...

Version history

Windows version SDK version Value added
1703 15063 Properties
1709 16299 DispatcherQueue


CoreWindow CoreWindow CoreWindow CoreWindow

Gets the app window associated with the current view.

Dispatcher Dispatcher Dispatcher Dispatcher

Gets the event message dispatcher associated with the current view.

DispatcherQueue DispatcherQueue DispatcherQueue DispatcherQueue

Gets the DispatcherQueue for the window.

IsComponent IsComponent IsComponent IsComponent

Gets whether the app was launched as a component that is embedded in another app.

This property is reserved for internal use and is not intended to be used in your code.

IsHosted IsHosted IsHosted IsHosted

Gets the value that indicates whether this app view is hosted or not.

IsMain IsMain IsMain IsMain

Gets a value that indicates whether this app view is the main app view or not.

Properties Properties Properties Properties

Gets properties that the app can associate with the view.

TitleBar TitleBar TitleBar TitleBar

Gets the title bar associated with the current view.


Activated Activated Activated Activated

Occurs when the view is activated.

HostedViewClosing HostedViewClosing HostedViewClosing HostedViewClosing

Indicates that the hosted view is closing. Provides an opportunity for hosted window scenarios to defer the tear down of the hosted view.

See also