如何在 XAML 应用程序中显示 .ico 图像文件?

How to display a .ico image file in a XAML app?

是否可以在 XAML C# 应用程序中显示 .ico 文件?适用于使用 Visual Studio 2015 的 WinRT Windows Phone 8.1 应用程序。

<Image Source="http://www.whosebug.com/favicon.ico"/> 在设计器中显示图标正常,但在模拟器中显示 运行 时却不行。

我尝试过使用下载的图标、以编程方式下载图标、另存为 .png 文件、从 LocalFolder 加载、使用 Assets 文件夹等...但图像仍未显示。似乎对此应该有一个简单的解决方案,或者根本不可能。

可以做到吗?

基本上...不,不可能。

以下在设计器中运行并显示图像的工作代码非常具有误导性:

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

查看此页面以获得明确的证据:Windows class - Windows app development

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