Called AppWindow, the new class allows UWP developers to run all application windows on the same UI thread. Microsoft has released AppWindow APIs with Windows 10 SDK Preview 18327. You can learn more about AppWindow and use the APIs from the GitHub page here. While UWP developers have always been able to create multiple windows in apps, they would need to write hundreds of lines of code. Thanks to the new class, dev’s can now create these multiple windows with just a few lines of code. While the new windows would previously run on a separate thread, AppWindow places everything onto a single thread.

— Windows UI (@WindowsUI) February 13, 2019

Details

For developers who are tied down to the old method for any reason, the old multi-thread system will remain in support. Microsoft says work on AppWindow is ongoing and the current implementation is not the finished article: “The API surface is by no means fully featured yet, we know that we still have a long way to go to get to that north-star vision of what modern windowing should be capable of in Windows.” The company also explained why it has taken nearly a year to release the API. “However, we also got feedback that led us to re-think some of our concepts and choices for the API surface we had presented. This led to us deciding to postpone the general release of the API by one iteration of the developer platform.”

Microsoft Launches AppWindow APIs for Multiple UWP App Windows - 27Microsoft Launches AppWindow APIs for Multiple UWP App Windows - 87Microsoft Launches AppWindow APIs for Multiple UWP App Windows - 99Microsoft Launches AppWindow APIs for Multiple UWP App Windows - 54Microsoft Launches AppWindow APIs for Multiple UWP App Windows - 91