|Summary:||FileImageSource is improperly used|
|Product:||Forms||Reporter:||James Clancey <clancey>|
|Severity:||normal||CC:||chris.king, david, jas, paul.dipietro, rui.marinho|
|Tags:||ac||Is this bug a regression?:||---|
|Last known good build:|
Description James Clancey 2017-02-28 10:41:30 UTC
Page Icon forces you to use FileImageSource, however it is improperly used on iOS. https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs#L670 https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/TabbedRenderer.cs#L411 You will notice it abuses the implicit operator to cast the FileImageSource to a string instead of using the FileImageSourceHandler. The implicit operator should be removed from the FileImageSource to prevent this from happening https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Core/FileImageSource.cs#L26-L29
Comment 2 Chris King 2017-03-10 23:54:09 UTC
Clancey, that's a public API and would be a breaking change. Don't see how we could change that at this point. If there are bugs that result we'll just have to fix the callsites. Please talk it over with Jason if you think there's reason to push a breaking change.
Comment 3 James Clancey 2017-03-11 00:11:05 UTC
This is not a public api. It's the implementation inside the internal method: https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/NavigationRenderer.cs#L655-L683
Comment 4 Chris King 2017-03-14 14:49:38 UTC
When you said "the implicit operator should be removed from the FileImageSource" in FileImageSource.cs I assumed you wanted that API removed even though it's public. What is the actual and excpeted behavior?
Comment 5 Rui Marinho 2017-03-21 15:10:25 UTC
Should be fixed on 2.3.5-pre1