Enabling the “Sun Valley” visual styles in Windows UI 2.6 preview (updated)

There is a lot of activity going on in the Windows UI GitHub repo a huge visual styles revamp for upcoming 2.6 release in line with the upcoming Windows 10 UI overhaul codenamed Sun Valley which is expected to arrive in 2021. If you are as excited as me to try these new control styles, you are in luck, as the latest Windows UI preview NuGet packages already include these new styles and they can be enabled with a simple XAML change for existing WinUI-based apps!

First of all, update to the latest Windows UI 2.6 preview from NuGet (you need to check the “Include prerelease” checkbox in NuGet package manager) – I’m using version 2.6.0-prerelease.210113001, but the upcoming release will have a lot more updated styles

Installing preview of WinUI 2.6

If you have an existing WinUI-based app, your App.xaml should already include a reference to XamlControlsResources resource dictionary. By default, it still uses the “Version1” control resources. To switch to the new ones, add the ControlsResourceVersion attribute:

<XamlControlsResources ControlsResourceVersion="Version2" xmlns="using:Microsoft.UI.Xaml.Controls" />

Updated: Recently, the API has changed and in future preview (and stable) releases it will be different than originally mentioned in this article. Big thanks to Marcel Wagner who notified me about this! Original text is still available below for posterity.

If you have an existing WinUI-based app, your App.xaml should already include a reference to XamlControlsResources resource dictionary. By default, it still uses the “2.5” version of visual styles. To switch to the new ones, add the Version attribute with value Latest.

And that’s it! You can launch your app now and you should see it in a whole new light!

An example of the new "Sun Valley" visual styles of ComboBox (credit WinUI GitHub]
An example of the new “Sun Valley” visual styles of ComboBox (credit WinUI GitHub]
Beautiful new DatePicker
Beautiful new DatePicker

Uno Platform support

We are actively working on bringing this latest UI overhaul from Windows UI to Uno Platform too! To track the progress, see the related GitHub issue and upvote to help us prioritize it 🙂 .

Buy me a coffeeBuy me a coffee

2 thoughts on “Enabling the “Sun Valley” visual styles in Windows UI 2.6 preview (updated)”

  1. Does this mean, than Windows 21H2 controls and styles will be based on WinUi 2.6?
    If so, when will it be visible in system UWP apps of Windows 10 insider builds, such as settings app?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.