How to display .ico image file in XAML application?

Is it possible to display a .ico file in a XAML C # application? This is a WinRT application for Windows Phone 8.1 using Visual Studio 2015.

<Image Source="http://www.stackoverflow.com/favicon.ico"/> shows the icon in the designer, but not when launched in the emulator.

I tried using the downloaded icon, loading the icon programmatically, saving as a .png file, downloading from LocalFolder, using the Assets folder, etc .... but the image still does not appear. It seems like there should be a simple solution for this or that it is simply not possible.

Can this be done?

+5
source share
1 answer

Basically ... no, it's impossible.

The following working code, which works in the designer and displays the image, is very misleading:

 <Image Source="http://www.stackoverflow.com/favicon.ico"/> 

See this page for clear evidence: Windows Class - Windows Application Development

Note Icon files are only supported on Windows. Not supported on Windows Phone 8.1

+7
source

All Articles