Windows App SDK 1.0.0-Preview1 with WinUI 3, more released

Reading time icon 4 min. read


Readers help support MSpoweruser. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more

winui 3

We reported a month ago that Microsoft has just released Windows App SDK 1.0.0-experimental, a toolkit that empowers desktop app developers to build apps with a modern Windows UI, APIs, and platform features.

Now Windows App SDK 1.0.0-Preview1 is available to download via Nuget.

[lwptoc title=”WindowsAppSDK 1.0 preview 1″ width=”30%” float=”right”]

Version 1.0.0 of the SDK brings the following features and improvements:

WinUI 3

This release of WinUI 3 is focused on building towards 1.0 Stable with bug fixes.

  • New features: No new features in Preview 1.
  • Fixed issues: For the full list of issues addressed in this release, see our GitHub repo.

For more information or to get started developing with WinUI, see:

Windowing

This release brings the Windowing API we introduced in Experimental 1 to a Preview state. There are no major new features areas in this release as it is focused on bugfixes, stability, and adjustments to the API signature. The noteworthy changes and additions are called out below.

New features:

  • DisplayAreaWatcher has been added to the Windowing APIs. This allows a developer to observe changes in the display topology and enumerate DisplayAreas currently defined in the system.
  • AppWindow now supports setting the window icon via the SetIcon method, and AppWindowTitleBar now supports selecting whether to show/hide the window icon along with the system menu via the IconShowOptions property.

Important limitations:

  • This release of AppWindow is currently available only to Win32 apps (both packaged and unpackaged).
  • The Windows App SDK does not currently provide methods for attaching UI framework content to an AppWindow; you are limited to using the HWND interop access methods.
  • Window title bar customization works only on Windows 11. Use the IsCustomizationSupported method to check for title bar customization feature support. We intend to bring this functionality down-level.

For more information, see Manage app windows.

Input

This release brings some new features to the Input API. The noteworthy changes and additions are called out below.

New features and updates:

  • PointerPredictor gives input latency sensitive applications such inking applications the ability to predict input point locations up to 15ms in the future to achieve better latency and smooth animation.
  • PenDeviceInterop enables you to acquire a reference to the Windows.Devices.Input.PenDevice by using the FromPointerPoint method.
  • InputCursor provides an explicit distinction between preset system cursor types and custom cursor types by removing the “Custom” type present in CoreCursor, and splitting the CoreCursor object into separate objects.
  • Updates to InputCursor APIs.

Important limitations:

  • This release of Input APIs has known issues with Windows version 1809.
  • MRT Core is not yet supported by any subtype of InputCursor.

MRT Core

Starting in version 1.0 Preview 1, MRT Core APIs have moved from the Microsoft.ApplicationModel.Resources namespace to the Microsoft.Windows.ApplicationModel.Resources namespace.

Other limitations and known issues

  • Projects created by using the C++ Blank App, Packaged with WAP (WinUI 3 in Desktop) project template encounter the following build error by default: fatal error C1083: Cannot open include file: 'winrt/microsoft.ui.dispatching.co_await.h': No such file or directory. To resolve this issue, remove the following line of code from the pch.h file. This issue will be fixed in the next release.
    C++

    #include <winrt/microsoft.ui.dispatching.co_await.h>
    
  • If you want to co_await on the DispatcherQueue.TryEnqueue method, use the resume_foreground helper function in the Windows Implementation Library (WIL):
    1. Add a reference to Microsoft.Windows.ImplementationLibrary NuGet package.
    2. Add the #include <wil/cppwinrt.h> statement to your code file.
    3. Use wil::resume_foreground(your_dispatcher); to co_await the result.
  • No support for Any CPU build configuration: The Windows App SDK is written in native code and thus does not support Any CPU build configurations. The WinUI project templates only allow architecture-specific builds. When adding the Windows App SDK to an existing .NET application or component that supports Any CPU, you must specify the desired architecture: x86x64 or arm64.
  • .NET apps must target build 18362 or higher: Your TFM must be set to net5.0-windows10.0.18362 or higher, and your packaging project’s <TargetPlatformVersion> must be set to 18362 or higher. For more info, see the known issue on GitHub.
  • C# projects using 1.0 Preview 1 must use the following .NET SDK: .NET 5 SDK version 5.0.400 or later if you’re using Visual Studio 2019 version 16.11.
  • Unpackaged apps not supported on Windows 10 version 1809: This should be resolved in the next release.

Read more and find the download links at Microsoft here.

More about the topics: Windows App SDK 1.0.0, winui 3