You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not supported on WinUI 3 and throws a COMException. This exception gets handled, but an empty/null brush will always be returned.
Steps to reproduce
// The Uri does not matter, it throws before loading anything._=awaitSurfaceLoader.LoadImageAsync(newUri("https://example.com"),CommunityToolkit.WinUI.Media.DpiMode.DisplayDpiWith96AsLowerBound);// The exception is handled so it will return `null`.
Expected behavior
No exception is expected.
The old-7.1 winUI branch worked for me. On that branch this dpi issue was commented out:
It might be tempting to think that this is the same issue as #233, however it is not. This is about 10 lines further into SurfaceLoader and this wasn't fixed by #299 in the latest update.
Help us help you
No, I'm unable to contribute a solution.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the latest Toolkit from Jan 24 (8.0.240109), SurfaceLoader fails to create a brush, and it will always return
null
on WinUI 3.This is because the private
SurfaceLoader.LoadSurfaceBrushAsync
method unconditionally callsDisplayInformation.GetForCurrentView()
.Windows/components/Media/src/Helpers/SurfaceLoader.cs
Line 103 in 2735c87
Steps to reproduce
Expected behavior
No exception is expected.
The old-7.1 winUI branch worked for me. On that branch this dpi issue was commented out:
https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/080bdb99e6810eb2157ad635f00e64a64acabb50/CommunityToolkit.WinUI.UI.Media/Helpers/SurfaceLoader.cs#L99
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
No response
Additional context
It might be tempting to think that this is the same issue as #233, however it is not. This is about 10 lines further into SurfaceLoader and this wasn't fixed by #299 in the latest update.
Help us help you
No, I'm unable to contribute a solution.
The text was updated successfully, but these errors were encountered: