Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selected Icon Not being Applied on WPF App

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?

like image 625
Shamim Hafiz - MSFT Avatar asked Jun 21 '11 11:06

Shamim Hafiz - MSFT


People also ask

How to change icon app in WPF?

"First go to Resource View (from menu: View --> Other Window --> Resource View). Then in Resource View navigate through resources, if any. If there is already a resource of Icon type, added by Visual Studio, then open and edit it. Otherwise right-click and select Add Resource, and then add a new icon."

How do I add apps to xaml to WPF project?

Go to add new items -> online templates and then choose 'Silverlight Application Class'. This will add a new app. xaml for you.


2 Answers

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.

like image 159
Thorsten Dittmar Avatar answered Sep 24 '22 04:09

Thorsten Dittmar


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

like image 26
shakram02 Avatar answered Sep 23 '22 04:09

shakram02