Gets the CoreWindow instance for the currently active thread.
public:
static CoreWindow^ GetForCurrentThread()
Type: CoreWindow
The CoreWindow for the currently active thread.
C++
void MyCoreWindowEvents::Run() // this is an implementation of IFrameworkView::Run() used to show context
{
CoreWindow::GetForCurrentThread()->Activate();
/...
CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit);
}
Namespace: Windows.UI.Core
Metadata: windows.winmd