Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CoreApplicationView class

Applies to Windows and Windows Phone

Represents an app window and its thread.

Syntax


public ref class CoreApplicationView sealed 

Attributes

[MarshalingBehavior(Standard)]
[Muse()]
[Version(0x06020000)]
[WebHostHidden()]

Members

The CoreApplicationView class has these types of members:

Events

The CoreApplicationView class has these events.

EventDescription
Activated Occurs when the view is activated.

 

Properties

The CoreApplicationView class has these properties.

PropertyAccess typeDescription

CoreWindow

Read-onlyGets the app window associated with the current view.

Dispatcher

Read-onlyGets the event message dispatcher associated with the current view.

IsHosted

Read-onlyGets the value that indicates whether this app view is hosted or not.

IsMain

Read-onlyGets a value that indicates whether this app view is the main app view or not.

 

Remarks

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

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



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.
        CoreWindow::GetForCurrentThread()->Activate();
    }

// ...
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel.Core
Windows::ApplicationModel::Core [C++]

Metadata

Windows.winmd

See also

DirectX swap chain implementation sample
CoreApplication.CreateNewView
CoreApplication.GetCurrentView

 

 

Show:
© 2014 Microsoft