1

I will be working on a C#/WPF application for release in February 2020, and I would like it to have a modern user interface. The term "modern user interface" can be taken to mean a user interface that is made up of views (i.e. custom controls) containing first-party UWP controls or Windows Community Toolkit controls from Microsoft.

To achieve this, the best approach that I am aware of is to use the recently released XAML Islands.

I believe that the prerequisites for using XAML Islands are that I must:

  • Write the new application targeting .NET Core 3.0
  • Follow the additional steps here to set up my project/solution
  • Use the WindowsXamlHost control to wrap my UWP views (preferable to wrapping individual Microsoft controls placed in normal WPF views)
  • Target a minimum version of Windows 10

The first three prerequisites I believe I will be able to meet. What I am not clear on is the specific version of Windows 10 that is required.

In the documentation here, the minimum supported Windows 10 version for using the WindowsXamlHost control is listed as being version 1903. However, that page makes several references to XAML Islands being a developer preview, which is no longer the case, and so I have hope that this requirement is out of date.

If you instead look at the GitHub page here, the minimum supported Windows 10 version is listed as being version 1809.

For me, that difference is going to be the deciding factor of whether or not I can use this approach. The minimum version of Windows 10 that I will be able to guarantee users will have is 1809.

So, which of the documentation pages is correct? Can a WPF application, targeting .NET Core 3, make use of XAML Islands when running on Windows 10 1809?

Adam Goodwin
  • 3,951
  • 5
  • 28
  • 33
  • It won't be easy for outsiders to give you an answer, so why not open an issue to ask Microsoft directly at https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/issues ? There is also a feedback link on every Microsoft documentation page to engage the right people. – Lex Li Nov 18 '19 at 18:31
  • That's true, but I believe I'm following Microsoft's own request by posting the question here. As per the following page, they ask that bugs and feature requests be created as GitHub issues, but for general questions they say Stack Overflow should be used with the windows-community-toolkit tag: https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/blob/rel/6.0.0/readme.md#feedback-and-requests – Adam Goodwin Nov 18 '19 at 23:18
  • 1
    Thanks Adam, I believe we're looking at getting the documentation updated to remove the Developer Preview text that got overlooked in the last update. For issues or clarifications with docs, please feel free to use the GitHub buttons at the bottom of the page. I'll look to clarifying some of this info in our readmes, thanks! – Michael Hawker - MSFT Dec 02 '19 at 20:49

1 Answers1

3

The support for XAML Islands was initially added in a preview version of Windows 1809.

1903 is however the first stable and officially supported version of Windows where you can use XAML islands to host UWP controls in non-UWP desktop applications, i.e. the official docs are accurate.

You may also want to take a look at WinUI 3. It's a major update to the Windows 10 native UI platform that is currently under active development by the Microsoft developer platform team and planned for release in 2020.

It will decouple the existing UWP Xaml APIs from the SDK and the operating system and ship them in a separate NuGet package that you can consume from any type of Windows deskop app including WPF and Windows Forms.

The alpha version should be compatible with Windows 10 version 1803 and higher. Note that this version is intended for early evaluation only and should NOT be used for production apps.

mm8
  • 163,881
  • 10
  • 57
  • 88
  • Thanks, yes I've seen WinUI 3 and am looking forward to it, unfortunately I suspect our application's release date is probably going to be a few months too early to be able to use WinUI 3 straight away. – Adam Goodwin Nov 20 '19 at 15:08