Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 37671 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
I am unsure as to why the Button object requires a FILE based image source rather than working with a generic ImageSource. Please considering changing this so that it is possible to use either a FileImageSource, a StreamImageSource, or (hopefully) a custom image source in the future.
This should be a non-breaking change as FileImageSource is based on ImageSource so all existing code should work as expected.
One wonders why anything has to be a FileImageSource. There are icons for example that could use other types of image sources as well.
This is a long-standing feature request. I've made 2 related requests in the past:
It makes no sense to me that we have an abstract ImageSource class and yet require all image-type assets in stock XF objects to be FileImageSource. The justification for this is apparently that Xamarin doesn't want developers to be able to shoot themselves in the foot by setting UI objects to get their icons from the network. While I understand the concern I do not share it - that's what a cache is for.
The current closed ImageSource ecosystem serves nobody well.
However I believe the design of ImageSource also needs re-thinking, because it contains factory methods that know about and create subclassed objects (FromFile, FromResource, FromStream, FromUri) with some implicit operators to convert between them. This makes the whole ecosystem very hard to extend cleanly and more-or-less ties us to only using the existing (sub)classes.