Selected Icon Not being Applied on WPF App
Asked Answered
D

2

8

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?

Daryl answered 21/6, 2011 at 11:34 Comment(0)
B
18

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.

Bichloride answered 21/6, 2011 at 11:38 Comment(3)
It doesn't show up anywhere. I forgot to add, its a WPF application. Will edit my question soon.Daryl
If you select the ICO file in the project properties under "Symbol & Manifest" (not sure whether that's the name in English - I'm using German VS2010), after a recompile the EXE should have the icon (which you can verify in the Explorer. To use it for the WPF window, use something Icon="Images\Logo.ico" as an attribute for the window.Bichloride
It's actually Icon and Manifest :). And the part about Icon did the Job. Thanks. Please consider editing your answer to include that so it can be treated as direct answer to my question.Daryl
H
11

The icon doesn't show in debug / release mode, you need to run the application using ctrl+F5, source

Homeopathic answered 7/6, 2016 at 21:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.