WinUI3Islands
XAML Islands for WinUI 3 (experimental).
Install / Use
/learn @dongle-the-gadget/WinUI3IslandsREADME
WinUI3Islands
Experimental sample application demonstrating XAML Islands for WinUI 3.
Prerequisites
- Visual Studio 2022 (with .NET Desktop Development, UWP app development and C++ app development workflow).
- Windows App SDK 1.2 Runtime.
Building the project
- Clone this repository.
- Open
WinUI3Islands.slnin Visual Studio. - Select the correct project as the startup project:
- For WPF, choose
WinUI3Islands.WPF.Package. - For C++, choose
WinUI3Islands.CPP.Package.
- For WPF, choose
- Start the project.
- Wait for the project to compile and deploy on your machine.
What currently works
Status legends
Note: all emojis use the Emoji 1.0 standard (2015) or the Unicode 6.0 standard (2010).
✔️ Works as expected | ❗ Works with issues | ❌ Doesn't work | ❓ Untested ---------------------|-----------------------|-----------------|---------------
Table
Item | Status | Notes |
---------------|--------|--------------------------------------|
Styles support (via Community Toolkit port) | ✔️ |
C++ support | ❗ | App may crash when window closes complaining about invalid handles. Theme detection doesn't work for root background. |
WPF support | ❗ | App crashes when window closes with "Invalid window handle" or when switching High Contrast settings. |
Custom C# components support | ❗ | XamlTypeInfo must be explicitly specified. Using a custom application object based on XamlApplication doesn't work. |
Custom C++ components support | ❌ | Doesn't work without workarounds due to XBF files being improperly placed in resources.pri. |
Unpackaged support | ❓ | This sample doesn't provide unpackaged support. |
WinForms support | ❓ |
Non-x64 architectures support | ❓ |
Projects within solution
- Libraries
-
Toolkit: Port of Community Toolkit'sXamlApplicationto WinUI 3.Note: the namespace has changed from
Microsoft.Toolkit.Win32.UI.XamlHosttoToolkitto prevent issues with the C#/WinRT projection. -
Toolkit.Managed: C#/WinRT projection forToolkit. -
Toolkit.XamlHost: Ported from Community Toolkit'sMicrosoft.UI.Win32.UI.XamlHost.
-
- Custom Components
CSCustomComponents: Custom components, written in C#.
- WPF
Toolkit.WPF: Port of Community Toolkit'sWindowsXamlHost(WPF) for WinUI 3.WinUI3Islands.WPF: The WPF sample app.WinUI3Islands.WPF.Package: MSIX package for the WPF sample app.
- CPP
WinUI3Islands.Cpp: The C++ sample app.WinUI3Islands.CPP.Package: MSIX package for the C++ sample app.
