Microsoft ships Windows App SDK 1.1 for building apps with WinUI 3, WebView2 – Visual Studio Magazine | Hot Mobile Press

news

Microsoft ships Windows App SDK 1.1 to create apps using WinUI 3, WebView2

Microsoft has released a major update to its Windows App SDK, a unifying resource for building different types of Windows apps using modern technologies.

Calling the Windows App SDK the evolution of Windows desktop app development, the company provides a unified set of libraries, frameworks, components, and tools — decoupled from Windows and exposed through NuGet — that developers can use to consistently build any desktop app. App build on OS versions from Windows 11 down to Windows 10 version 1809. It was designed to reduce the complexity of Windows app development caused by the emergence of two separate Windows app API schemes, one for legacy Win32 APIs and one for the more modern Universal Windows Platform (UWP).

In fact, the Windows App SDK used to be called “Project Reunion” because it brought together these two different API approaches to app development that resulted from the debut of UWP.

project reunification
[Click on image for larger view.] project reunification (Source: Microsoft).

One of the SDK’s modern technologies mentioned above 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 key 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#, as well as MSIX core technology for packaging applications for distribution to Windows desktop computers via the store or a developer’s own delivery pipeline. Other APIs cover the breadth of functionality, from windowing to file system and storage to networking, printing, notifications and so on.

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

In the latter department is the new ability to use mica and background acrylics. “Mica is an opaque, mode-aware material new to Windows 11 that includes the user’s background color to engage users and create visual hierarchy,” Microsoft said. “To apply these materials to your application’s background, check out the new SystemBackdrop sample in the WinUI 3 gallery. The WinUI 3 gallery has been updated to include several new controls and samples to demonstrate the design language of Windows 11, along with a visual refresh.”

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

The GitHub roadmap
[Click on image for larger view.] The GitHub roadmap (Source: Microsoft).

The following are brief summaries of other version 1.1 release highlights as described by Microsoft:

  • Notifications: “MSIX packaged, sparse packaged, and unpackaged apps can now send Windows app notifications (aka toast notifications) and push notifications to inform users when they are not currently using the app.”
  • Elevation: “WinAppSDK 1.1 removes limitations from 1.0 that prevented running an app as an administrator. Development, management, and systems management tools can now harness the full power of the Windows App SDK.”
  • C# performance improvements: “C# apps will experience significantly improved performance in many different scenarios with updates in the WinRT interop layer. In a basic Hello World WinUI 3 app, you can expect ~9% improvement in launch times compared to our previous WinAppSDK 1.0 version.”
  • Windowing APIs: “With windowing APIs, you can now control the relative z-order of your windows. This is a WinRT version of SetWindowPos’ hWndInsertAfter functionality. Each AppWindow represents a top-level window that you can move above or below other top-level windows. Examples are written to demonstrate the various scenarios for manipulating the relative z-order between your app’s windows.”
  • Developer Experience: New features designed to make the SDK experience easier and simpler when building desktop Windows apps include app lifecycle and restart. “With Windows App SDK 1.1, you can now programmatically restart your application and set recovery options after the app terminates due to events such as an app update, app crash, or hang. This means you can recover app state after an unexpected reboot, and users can immediately get 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 built with this extension contain well-formed, readable code and integrate the latest development features while implementing best patterns and leading practices.”
  • Standalone applications: “Windows App SDK 1.1 introduces support for self-contained deployment, where your app carries the WinAppSDK dependencies with it. This allows you to control the WinAppSDK version and use different deployment strategies like xcopy deployment.”
  • Bootstrapper APIs: “The Bootstrapper APIs required to use WinAppSDK features (e.g. WinUI 3, MRT Core) in apps not deployed with MSIX are now easier to use and troubleshoot. The updates include a new user interface prompt, additional logging to the event log, and additional error handling options including calls to DebugBreak() and/or FailFast.”
  • Environment Variable Manager: “With WinAppSDK 1.1, you can now add, remove, and change environment variables without having to use the registry API directly. Now changing EVs across the process, user, and machine space is a unified experience.”
Windows App SDK Roadmap Items
[Click on image for larger view.] Windows App SDK Roadmap Items “Considering” (Source: Microsoft).

The development team will update the project’s roadmap to reflect what’s available for version 1.2, which is expected later this year. Developers can vote on items under consideration, including media controls, maps, ink, and more, along with XAML islands (which can be used for WinUI 3 WPF or WinForms apps), UWP migration tools, and more, as outlined in the shown in the graphic above.

About the author


David Ramel is an editor and writer for Converge360.



Leave a Comment