Which UWP controls can be used in XAML islands?

Michael Chourdakis 66 Reputation points
2021-10-06T20:37:29.837+00:00

Some of them work nicely.

Button, StackPanel, TextBlock, CheckBox, OK.

Some of them do not work, they simply throw when their XML is loaded.
For example TeachingTip, with or without the muxc: namespace. WebView also doesn't load.

<WebView x:Name="webView1" Source="http://www.pizza.com"/>

When using XamlReader::Load to load this, it throws {value=0x802b000a } winrt::hresult E_XAMLPARSEFAILED:XAML parsing failed.

Is there documentation to specify which would and which would not work or, is there an additional library that must be linked?

I have created a small library (https://github.com/WindowsNT/uwplib) that is used by my projects, but not everything demonstrated in the 'xaml gallery' demo would work.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,706 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
747 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,612 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 82,751 Reputation points
    2021-10-07T08:18:27.333+00:00

    TeachingTip is a WinUI control (Microsoft.WindowsAppSDK package)
    Webview is a bit different as explained at XAML Islands
    I had tested it with Microsoft.Toolkit.Forms.UI.Controls (replaced by WebView2 now)
    (I could create it with XAML Islands, but it crashed then...)

    1 person found this answer helpful.
    0 comments No comments