In an UWP app, how can I get all currently open `Window` instances?

See title I want to get all open windows, and get their Window instances, I also want to get a callback whenever a new Window is opened Using WinUI 2
8 Replies
Lordzipzap
Lordzipzap6mo ago
hey man try using pywin pywinauto *
jcotton42
jcotton426mo ago
This is UWP, Python isn’t applicable.
Lordzipzap
Lordzipzap6mo ago
Unfortunate i have no exp with uwp
leowest
leowest6mo ago
I mean its a c# discord why did u even expect python to be the solution?
Lordzipzap
Lordzipzap6mo ago
Yes i made a mistake Danm, i am being punished for sugessting something
reflectronic
reflectronic6mo ago
you will almost certainly need a full trust app service it allows you to write a separate application which runs without the UWP app container. and then, you just use the normal APIs for this you will have to do some back-and-forth communication between it and your main app using the app service API
reflectronic
reflectronic6mo ago
@ref *&Sergio wrote a library to make this easier https://devblogs.microsoft.com/ifdef-windows/microsoft-store-open-source-series-appservices-library/ if you have specific questions about it, i am sure he can help
Sergio Pedri
#ifdef Windows
Microsoft Store Open Source Series — AppServices library - #ifdef W...
Introducing the AppServices library we built for the Microsoft Store to manage full trust Desktop extensions, and how you can use it in your UWP apps too!
Reabstraction
ReabstractionOP6mo ago
I mean like for that app Not every app Just the one UWP app
Want results from more Discord servers?
Add your server