Selected Icon Not being Applied on WPF App

Shamim Hafiz - MSFT picture Shamim Hafiz - MSFT · Jun 21, 2011 · Viewed 10.1k times · Source

I have changed the icon in the Main Project Properties Icon and Manifest option. Yet, after running the App, the default Icon is what shows up.

Any idea why such odd behavior will occur?

Answer

Thorsten Dittmar picture Thorsten Dittmar · Jun 21, 2011

Does the default icon show up in the explorer or does it show up in the taskbar buttons? In case of the latter: change the icon for the forms as well, as the task bar button icon is not retrieved from the exe file, but from the form's Icon property.

For WPF applications, use the attribute

Icon="Images\Logo.ico"

for the Window element in XAML to have the window show the icon.