情况:使用VS 2012实现WPF应用程序,并使用标记向主窗口添加自定义图标Icon="images\myIcon.gif">.
从VS 2012启动WPF应用程序时,CTRL + F5图标将显示在任务栏和主窗口的左上角.
问题:我使用VS 2012的发布向导(One Click安装例程)发布了我的应用程序,并在我的计算机上安装了该应用程序.启动安装的应用程序时,左上图标仍显示在主窗口中,但任务栏图标不显示.而是显示Windows默认图标.
问题:有人知道问题是什么或我错过了什么?
Her*_*rdo 10
来自MSDN:
Windows Presentation Foundation(WPF)独立应用程序有两种类型的图标:
Run Code Online (Sandbox Code Playgroud)One assembly icon, which is specified by using the <ApplicationIcon> property in the application's project build file. This icon is used as the desktop icon for an assembly. One icon per window that is specified by setting Icon. For each window, this icon is used in its title bar, its task bar button, and in its ALT-TAB application selection list entry.
如果要在任务栏中显示图标,则需要设置程序集/应用程序图标: