Windows App SDK 1.0.0-Preview1 with WinUI 3, more released
4 min. read
Published on
Read our disclosure page to find out how can you help MSPoweruser sustain the editorial team Read more
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):- Add a reference toย Microsoft.Windows.ImplementationLibraryย NuGet package.
- Add theย
#include <wil/cppwinrt.h>
ย statement to your code file. - 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:ย
x86
,ยx64
ย 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.
User forum
0 messages