Describe the bug
Adding Microsoft.Graphics.Win2D to a Project and embedding a CanvasControl in a Window or even UserControl works great. However, when embedding a CanvasControl in a ResourceDictionary control, it results in a runtime error, which isn't consistent.
The attached solution demonstrates the issue. It is configured to show a CanvasControl in all 3 scenarios.
Win2DSandbox.zip
Steps to reproduce the bug
Open provided solution and ensure packages are installed.
Build and run. See crash happen.
Expected behavior
No crash
Screenshots
No response
NuGet package version
None
Windows version
Windows 10 (21H2): Build 19044
Additional context
No response