[regression/8.0.0-preview.5.8529] Provide API to set ImageSource to the ImageSourcePartLoader #16367
Labels
area-controls-image
Image control
fixed-in-8.0.0-rc.1.9171
Look for this fix in 8.0.0-rc.1.9171
i/regression
This issue described a confirmed regression on a currently supported version
p/1
Work that is important, and has been scheduled for release in this or an upcoming sprint
partner/cat 😻
this is an issue that impacts one of our partners or a customer our advisory team is engaged with
partner
Issue or Request from a partner team
t/bug
Something isn't working
Milestone
Description
In net7 we are using the ImageSourcePartLoader class to load native images for several properties of type ImageSource. However, after this change this is no longer possible. Now in net8 the source is tightly coupled with the virtual MAUI view.
Because of that you are no longer able to have two (or more) properties of type ImageSource in the MAUI virtual view. We are looking for a way to load properties of type ImageSource without being dependent on the virtual MAUI control.
Public API Changes
You can provide a way to set the ImageSource of the ImageSourcePartLoaded through the constructor for example or with a property.
If this is not an option can you at least make the following extension method public so we can try loading the native images without the usage of ImageSourcePartLoaded:
https://github.com/dotnet/maui/blob/release/8.0.1xx-preview6/src/Core/src/Platform/iOS/ImageSourcePartExtensions.cs
https://github.com/dotnet/maui/blob/release/8.0.1xx-preview6/src/Core/src/Platform/Android/ImageSourcePartExtensions.cs
https://github.com/dotnet/maui/blob/release/8.0.1xx-preview6/src/Core/src/Platform/Windows/ImageSourcePartExtensions.cs
The method is already public for Tizen, so it will be nice to have it for Android, iOS and WinUI as well.
Intended Use-Case
In my custom control I have more than one property of type ImageSource. By implementing the IImageSourcePart interface I can return only a single property that will be loaded by the ImageSourcePartLoaded class.
The text was updated successfully, but these errors were encountered: