John Threepwood
John Threepwood

Reputation: 16143

Customer application icon is not showing in taskbar - why?

Situation: Implementing a WPF application with VS 2012 and added a custom icon to the main window with tag Icon="images\myIcon.gif">.

When starting the WPF application out of VS 2012 with CTRL + F5 the icon will be shown in the taskbar and in the left top corner of the main window.

Problem: I published my application with VS 2012's publishing wizard (One Click installing routine) and installed the application on my computer. When starting the installed application the left top icon ist still shown in the main window, but the taskbar icon not. Instead a windows default icon is shown.

Question: Does someone know what the problem is or what I have been missing?

Upvotes: 5

Views: 6599

Answers (2)

Stefan Over
Stefan Over

Reputation: 6046

From Microsoft Docs:

Windows Presentation Foundation (WPF) standalone applications have two types of icons:

  • One assembly icon, which is specified by using the 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.

If you want to display an icon in the taskbar, you need to set the assembly/application icon:

  • Open the properties of your project deployed by ClickOnce
  • Application --> Resources
  • Select Icon and manifest and browse for the icon you desire

Upvotes: 12

Ali Esam
Ali Esam

Reputation: 11

ShowInTaskbar="True"

Upvotes: -1

Related Questions