Windows UI Library 2.1

The first open-source version of the Windows UI Library – WinUI 2.1 (released April 2019).

WinUI gives you many of the latest Windows UX platform features, including up-to-date Fluent controls and styles, available in a way you can use right away, backward-compatible to Windows 10 Anniversary Update (14393). The WinUI 2 Gallery gives you samples to explore all the cool new features added to the library.

Download the WinUI 2.1 NuGet package

You can choose to use the WinUI packages in your app using the NuGet package manager: see Getting Started with the Windows UI Library for more information.

The Windows UI Library (WinUI) is hosted on GitHub where we encourage you to file bug reports, feature requests and community code contributions.

What's new in this release

ItemsRepeater

Use an ItemsRepeater to create custom collection experiences using a flexible layout system, custom views, and virtualization. Unlike ListView, ItemsRepeater does not provide a comprehensive end-user experience – it has no default UI and provides no policy around focus, selection, or user interaction. Instead, it's a building block that you can use to create your own unique collection-based experiences and custom controls. It supports building of richer and more performant experiences.

Short video showing the behavior of the Items Repeater control.

Documentation

AnimatedVisualPlayer

The AnimatedVisualPlayer hosts and controls playback of animated visuals, enabling you to add high performance custom motion graphics to your app. For instance, the AnimatedVisualPlayer is used to display and control Lottie animations.

Short video showing the behavior of the Animated Visual Player control.

Documentation

TeachingTip

TeachingTip provides an engaging and Fluent way for applications to guide and inform users with non-invasive and content-rich tips. TeachingTip can bring focus to new or important features, teach users how to perform tasks, and enhance workflow by providing contextually relevant information to your task at hand.

Short video showing the behavior of the Teaching Tip control.

Documentation

RadioMenuFlyoutItem

Includes the ability to have 'Radio Button' style options in a MenuBar. This enables groups of options with bullets that are tied together like a radio button group. The logic is handled for the developer.

Screenshot showing the behavior of the Radio Menu Fly out Item control.

Documentation

CompactDensity

Compact mode enables developers to create comfortable experiences for any number of scenarios. Simply by adding a resource dictionary your application can fit on average ~33% more UI.

Screenshot showing the behavior of the Compact Density control.

Documentation

Shadows

Example

Creating a visual hierarchy of elements in your UI makes the UI easy to scan and conveys what is important to focus on. Elevation, the act of bringing select elements of your UI forward, is often used to achieve such a hierarchy in software.

With Windows 10 May 2019 Update, many of our common controls add elevation by using z-depth and shadow by default. The NavigationView and TeachingTip controls in WinUI 2.1 will also have default shadows when running on an OS with Windows 10 May 2019 Update. The full list of controls that have default shadows and how to use additional APIs will be available once the Windows 10 May 2019 Update is released and the link will be posted here.

Examples

Tip

For more info, design guidance, and code examples, see Design and code Windows apps.

The WinUI 3 Gallery and WinUI 2 Gallery apps include interactive examples of most WinUI 3 and WinUI 2 controls, features, and functionality.

If installed already, open them by clicking the following links: WinUI 3 Gallery or WinUI 2 Gallery.

If they are not installed, you can download the WinUI 3 Gallery and the WinUI 2 Gallery from the Microsoft Store.

You can also get the source code for both from GitHub (use the main branch for WinUI 3 and the winui2 branch for WinUI 2).

Documentation

How-to articles for Windows UI Library controls are included with the Universal Windows Platform controls documentation.

API reference docs are located here: Windows UI Library APIs.

Microsoft.UI.Xaml 2.1 Version History

Microsoft.UI.Xaml 2.1 Official release

April 2019

GitHub release page

NuGet package download

New feature (not included in earlier pre-releases)

  • CompactDensity: Compact mode enable developers to create comfortable experiences for any number of scenarios. Simply by adding a resource dictionary your application can fit on average ~33% more UI.

  • Shadows: Creating a visual hierarchy of elements in your UI makes the UI easy to scan and conveys what is important to focus on. Elevation, the act of bringing select elements of your UI forward, is often used to achieve such a hierarchy in software. Many of our common controls add elevation by using z-depth and shadow by default.

Microsoft.UI.Xaml 2.1.190218001-prerelease

February 2019

GitHub release page

NuGet package download

New experimental features:

  • TeachingTip control
    This new control provides a way for your app to guide and inform users in your application with a non-invasive and content rich notification. TeachingTip can be used for bringing focus to a new or important feature, teaching users how to perform a task, or enhancing the user workflow by providing contextually relevant information to their task at hand.

Microsoft.UI.Xaml 2.1.190131001-prerelease

February 2019

GitHub release page

NuGet package download

New experimental features:

Microsoft.UI.Xaml 2.1.181217001-prerelease

December 2018

GitHub release page

NuGet package download

New experimental features: