I think Window.Current is what you are looking for.
Windows RT Component, Getting the app's core window
-
06-07-2023 - |
Pergunta
I just have a simple question, with a Windows Runtime Component (as in a library) that I am making how do I get the window object for the app? CoreWindow::GetForCurrentThread() throws an exception as it seems that the library runs in a different thread then the app. Any one know how to get the app window?
EDIT: GetForCurrentThread is not the problem, it seems that that it only works on the UI thread not a background thread, I would like a way to get at it from a background thread. Is it possible?
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow