WinUI 3 in Windows App SDK 2.3.1
This release of WinUI 3 ships as part of Windows App SDK 2.3.1. To use it in your app, install the Microsoft.WindowsAppSDK 2.3.1 NuGet package.
What's new in WinUI 3:
XamlOptionalChanges. A new API that lets apps opt into optional breaking changes before XAML initialization. In the same release, theDISABLE_XAML_GENERATED_MAINpreprocessor constant now renames the generatedmain()method (C#:XamlGeneratedProgram.XamlGeneratedMain(); C++/WinRT:wXamlGeneratedMain()) instead of removing it, so a custommain()can invoke the default implementation. See PR microsoft/microsoft-ui-xaml#11110.- XAML performance optimizations. A broad set of startup, styling, and resource-lookup optimizations. Several are opt-in through the
DefaultStyleOptimizationsandOptimizeApplyStylesXamlChangeIds, including optimizedXamlControlsResourcesstyles, a lighterFontIcon/BitmapIconvisual tree, and fasterThemeResourceandResourceDictionarylookups.
Bug fixes:
- Fixed a use-after-free crash in
CPopupRoot::ReplayPointerUpdatewhen a popup is closed synchronously during pointer-event replay. - Fixed a crash in
MediaPlayerPresenterwhen the GPU device is lost during media playback event handling. - Fixed a crash (null
LayoutStatedereference) inUniformGridLayoutandFlowLayoutthat could occur when a collection change was raised on anItemsRepeaterthat was no longer loaded. - Fixed windowed and non-windowed flyouts appearing misaligned (about one item-height above the parent item) for side placements when they open upward near the bottom of the screen.
- Fixed an access violation in
CXamlIslandRoot::GetScreenOffsettriggered by re-entrant UI Automation queries during XAML island teardown. - Fixed a fail-fast in
CPopup::RemoveChildwhen aToolTipclose pumped messages and re-entered the close path.
For the full set of changes across Windows App SDK 2.3.1, see the Windows App SDK 2.3.1 release notes.
Try it out
- Install the Microsoft.WindowsAppSDK 2.3.1 NuGet package.
- Download and update the WinUI Gallery to see the WinUI 3 updates firsthand.