情况:用VS 2012实现WPF应用程序,并使用tag将自定义图标添加到主窗口Icon="images\myIcon.gif">
。
从VS 2012中启动WPF应用程序时,带有CTRL + F5
图标的图标将显示在任务栏和主窗口的左上角。
问题:我使用VS 2012的发布向导(一键安装例程)发布了我的应用程序,并在计算机上安装了该应用程序。启动已安装的应用程序时,左上方的图标仍会显示在主窗口中,而任务栏图标则不会。而是显示Windows默认图标。
问题:有人知道问题出在哪里或我一直在想什么吗?
从MSDN:
Windows Presentation Foundation(WPF)独立应用程序具有两种类型的图标:
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.
如果要在任务栏中显示图标,则需要设置程序集/应用程序图标:
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句