Skip to content

Some classes do not work well on Xaml Islands. #3205

@azchohfi

Description

@azchohfi

Describe the bug

Related to CommunityToolkit/Microsoft.Toolkit.Win32#228

There are a lot of issues when some controls and helpers of the toolkit run in the context of a Xaml Island. We need these fixed.

Steps to Reproduce

For example, try to use the ThemeListener class in a WPF app with Islands. It will throw exceptions.
Anything that leverages the Dispatcher using, for example CoreApplication.MainView.Dispatcher, will not work inside Xaml Islands since there is no such thing as a MainView. We need to refactor those to use the new DispatcherQueue.

Expected behavior

Should work in UWP and inside Xaml Islands (.Net Core).

Environment

NuGet Package(s): 6.0.0

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • Insider Build (build number: )

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • Insider Build (xxxxx)

Device form factor:

  • Desktop
  • Xbox
  • Surface Hub
  • IoT

Visual Studio

  • 2017 (version: )
  • 2019 (version: )
  • 2019 Preview (version: )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions