To help you build native, engaging, and modern Windows applications, we’ve just released the 1.1 version of the Windows App SDK. Building off of the 1.0 release in November 2021, we’re excited to bring several new features and capabilities to the Windows App SDK while increasing its stability & performance.
The Windows App SDK is the starting point for building and shipping Windows desktop apps (spanning C++ and .NET) with WinUI 3 controls and WebView2 for modernized UI development. Keep up to date with new feature updates by participating in the GitHub repo and following the product roadmap.
Get Started with Windows App SDK
To start using Windows App SDK, see Get started with Windows App SDK to set up your development environment and learn more about the components included in this release. If you want to jump right in with building your first WinUI 3 desktop app, start with our tutorial or watch our Learn Live session as part of //Build 2022.
Alongside numerous stability improvements, Windows App SDK 1.1 includes several new and updated features across its component areas that you can take advantage of in your applications to delight your users.
WinUI 3 applications are now able to use Mica & Background Acrylic materials. Mica is an opaque, mode-aware material new to Windows 11 that incorporates the user’s background color to delight users and create visual hierarchy. To apply these materials to the backdrop of your application check out the new SystemBackdrop example in the WinUI 3 Gallery. The WinUI 3 Gallery has been updated to include several new controls & samples alongside a visual refresh to showcase the Windows 11 design language.
MSIX-packaged, sparse-packaged, and unpackaged apps can now send Windows app notifications (also known as toast notifications) and push notifications to inform users when they are not currently using the app. This means you can send app notifications locally or from your own cloud service. You can also send raw notifications from your own cloud service to deliver new updates to your app in a power-efficient and dependable way. Check out our notification UX guidance for best practices around designing useful, productive, and engaging notifications.
WinAppSDK 1.1 removes constraints from 1.0 that prevented running an app as an administrator. Development, administration, and system management tools can now leverage the full power of Windows App SDK. For full support, ensure that your target devices have the latest updates for Windows 11 and Window 10 (May 2022 servicing updates). Support for Windows 10 LTSC 2019 is coming in a future servicing update.
C# Performance Improvements
C# apps will see significantly improved performance in many different scenarios through updates in the WinRT interop layer. In a simple Hello World WinUI 3 app, you can expect to see startup times improved by ~9% compared to our previous WinAppSDK 1.0 release. Another common scenario where improvements can be seen is with dependency properties in WinUI 3 apps.
Windowing APIs now allow you to control the relative z-order of your windows. This is a WinRT version of the SetWindowPos’s hWndInsertAfter functionality. Each AppWindow represents a top-level window that you can move above or below other top-level windows. Samples are being written to illustrate the different scenarios for manipulating the relative z-order among your app’s windows.
In custom drawn title bars, you are now able to easily create a tall titlebar (i.e., taller system caption controls and drag region). This allows for a more touch friendly user experience in your app whilst providing more room for interactive content in the title bar such as a search box or person picture. The title bar customization documentation provides more details about how and when to implement a taller title bar.
Another useful feature introduced in this version of Windows App SDK is the ability to change the size of your window based on the client area size. This allows you to set the size of the client area, and then resize the window’s non-client area to match this. In other words, removing the need to calculate the overhead that the non-client area has to get a specific client size.
In addition to these new APIs, there are also changes to the default Presenter applied to an AppWindow when using GetFromWindowId() to get hold of it. The change in behavior is non-breaking in that you will still have a default Presenter of the same type as before (OverlappedPresenter), but it will not block any window style changes coming from outside of the AppWindow/OverlappedPresenter API surface.
WinAppSDK 1.1 brings several features that will make your experience easier & simpler when building desktop Windows apps.
App Lifecycle & Restart
With Windows App SDK 1.1, you are now able to programmatically restart your application and set recovery options after app termination due to events such as an app update, app crash, or hang. This means you can recover app state after unexpected restart and your users are immediately back to interacting and engaging with your application. These capabilities are available as part of the new AppInstance.Restart() API in the AppLifecycle class. This is a lifted and synchronous version of the UWP RequestRestartAsync()API now available for both packaged or unpackaged desktop applications. Check out the Restart API docs on GitHub for usage & reference information.
Template Studio for WinUI (C#) is now available! Template Studio is an extension for Visual Studio 2022 that accelerates the creation of new WinUI apps using a wizard-based experience. Projects created with this extension contain well-formed, readable code and incorporate the latest development features while implementing proven patterns and leading practices. The generated code includes links to documentation and TODO comments that provide useful insight and guidance for turning the generated projects into production applications. If you’re new to WinUI/Windows App SDK or want more scaffolding like MVVM out-of-the-box in your new projects, Template Studio for WinUI (C#) is a great way to get started!
Windows App SDK 1.1 introduces support for self-contained deployment where your app carries the WinAppSDK dependencies with it. This enables you to control the WinAppSDK version and use different deployment strategies, like xcopy deployment. Learn about the differences between framework-dependent and self-contained deployment and follow the self-contained deployment guide to get started.
The Bootstrapper APIs required for using WinAppSDK features (e.g. WinUI 3, MRT Core) in apps that don’t deploy with MSIX are now easier to use and troubleshoot. Updates include a new user UI prompt, additional logging to the event log, and additional options to handle failures including calls to DebugBreak() and/or FailFast. These changes were largely motivated by feedback from our community; thank you!
Environment Variable Manager
With WinAppSDK 1.1 you are now able to add, remove, and modify environment variables without having to directly use the registry API. Now, changing EVs in the process, user, and machine scope is one unified experience. Additionally, in packaged apps, EV changes made by the environment manager will automatically revert to reduce the amount of EV changes that apps leave behind. Check out EV Manager on GitHub for more info.
Staying in the loop
You can stay up to date with the team on the Windows App SDK GitHub repo and the WinUI GitHub repo, and through our monthly WinUI Community Calls where we share roadmap updates and other exciting news, and we demo new features.
You can also connect with us on Twitter using #WindowsAppSDK and @WindowsUI.
We look forward to seeing the beautiful apps you create with WinAppSDK 1.1 & WinUI 3!
Windows App SDK team