Blank image when Source set to null or on image loading error
Description of Change
Replace existing image with nothing when image source is set to null; replace existing image with nothing when new image results in a loading error.
Issues Fixed
Fixes #8787
Thank you for your pull request. We are auto-formating your source code to follow our code guidelines.
Hi @jsuarezruiz
Just out of curiosity, what about the Image Placeholder especially when the image failed to load. This is a need functionality in any Mobile apps.
Hi @jsuarezruiz
Just out of curiosity, what about the Image Placeholder especially when the image failed to load. This is a need functionality in any Mobile apps.
I agree that .NET MAUI should support placeholder images, but that is outside the scope of this PR.
/backport to net7.0
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/4438518577
@jfversluis backporting to net7.0 failed, the patch most likely resulted in conflicts:
$ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Blank image when Source set to null or on image loading error Fixes #8787
.git/rebase-apply/patch:77: trailing whitespace.
else
.git/rebase-apply/patch:293: trailing whitespace.
throw new XunitException($"Color {unexpectedColor} was found at point {x}, {y}.");
.git/rebase-apply/patch:297: trailing whitespace.
warning: 3 lines add whitespace errors.
Using index info to reconstruct a base tree...
M src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
M src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
Falling back to patching base and 3-way merge...
Auto-merging src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
Auto-merging src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Blank image when Source set to null or on image loading error Fixes #8787
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128
Please backport manually!
@jfversluis an error occurred while backporting to net7.0, please check the run log for details!
Error: git am failed, most likely due to a merge conflict.
Backported manually: #13989