News

Microsoft Ships Windows App SDK 1.1 to Build Apps Using WinUI 3, WebView2

Microsoft shipped a major update of its Windows App SDK, a unifying resource for building various kinds of Windows apps with modern technologies.

The company calls the Windows App SDK the evolution of Windows desktop app development, providing a unified set of of libraries, frameworks, components and tools -- decoupled from Windows and served up via NuGet -- that developers can use to consistently create any desktop app on OS versions ranging from Windows 11 down to Windows 10 version 1809. It was designed to alleviate the complexity of Windows app development that was caused by the emergence of two separate Windows app API schemes, one for older Win32 APIs and one for the more modern Universal Windows Platform (UWP).

In fact, the Windows App SDK was formerly called "Project Reunion" because it unified those two disparate app development API approaches that resulted from the debut of UWP.

Project Reunion
[Click on image for larger view.] Project Reunion (source: Microsoft).

One of the SDK's aforementioned modern technologies is WinUI 3, the native UI interface layer that has evolved into a full user experience (UX) framework that leverages Fluent Design for a consistent control/style experience.

WinUI 3
[Click on image for larger view.] WinUI 3 (source: Microsoft).

Another primary component of the SDK is the WebView2 control, which helps developers embed web technologies (HTML, CSS, and JavaScript) into native apps, using Microsoft Edge as the rendering engine to display the web content.

WebView2
[Click on image for larger view.] WebView2 (source: Microsoft).

Other parts of the kit provide language-native projections for working with C++, Rust and C#, along with MSIX-Core tech for packaging application for distribution to Windows Desktop machines via the store or a developer's own delivery pipeline. Other APIs cover the gamut of functionality from windowing to filesystem and storage to networking, printing, notifications and so on.

Windows App SDK v1.0 debuted last November, and the dev team on Friday (June 3) announced v1.1, which features stability improvements and new features and functionality.

In the latter department is the new ability 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," Microsoft said. "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."

As the roadmap graphic below shows, the Mica materials are just one part of a raft of improvements in v1.1, which saw way more features and bits of functionality added compared to v1.0:

The GitHub Roadmap
[Click on image for larger view.] The GitHub Roadmap (source: Microsoft).

Following are brief summaries of other v1.1 release highlights as described by Microsoft:

  • Notifications: "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."
  • Elevation: "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."
  • 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."
  • Windowing APIs: "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."
  • Developer experience: Among new features designed to make the SDK experience easier and simpler when building desktop Windows apps is app lifecycle and 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."
  • Template Studio: "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."
  • Self-contained applications: "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."
  • Bootstrapper APIs: "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."
  • 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."
Windows App SDK Roadmap Items 'Under Consideration'
[Click on image for larger view.] Windows App SDK Roadmap Items 'Under Consideration' (source: Microsoft).

The dev team will update the project's roadmap to reflect what's on tap for v1.2, expected near the end of this year. Developers can vote on items under consideration, which include controls for media, maps, inking and more, along with XAML Islands (which can be used to for WinUI 3 WPF or WinForms apps), UWP migration tools and more, depicted in the graphic above.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube