CoreWindow.GetForCurrentThread Method

Gets the CoreWindow instance for the currently active thread.

Syntax

public:
static CoreWindow^ GetForCurrentThread()  

Return value

Type: CoreWindow 

The CoreWindow for the currently active thread.

Remarks

Example

C++

void MyCoreWindowEvents::Run() // this is an implementation of IFrameworkView::Run() used to show context
{
    CoreWindow::GetForCurrentThread()->Activate();

    /...

    CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit);
}  

Requirements

Namespace: Windows.UI.Core

Metadata: windows.winmd

See also

Reference

CoreWindow Class

CoreWindow Members

Windows.UI.Core Namespace