FontIcon is not working in Image

Image image = new Image(“My Caption”, resource);

If resource is a FontIcon, the image is not displayed. Also, no warnings are raised.

I know that the a FontIcon can be displayed using a Label but as per the API of the Image, it should interpret the resource passed to it.

Hi, this is an unfortunate side effect of the fact that (font) icons should not really be Resources, but that was the only way to implement them without totally breaking existing API.

Anyway, even disregarding font icons, Image can by no means display arbitrary resources, or even arbitrary images - only those that the browser can recognize in an

. For instance, a .psd image cannot be displayed at least without a browser extension. I understand that it’s debatable what exactly counts as an “image”, and the documentation of the Image class should probably be clarified.

Completely agree.
However, we could throw a runtime exception if a displayable resource is not passed.