I'm trying to change the application icon from default to something else. So what I did, is I made an icon and saved it. Then I went to the application tab in the property of my project and changed the icon. There he shows the icon like I made it, but when I run my project it shows a gray icon instead of showing my icon.
What i'm doing wrong here?
Your application icon shows in the taskbar. The icon on the topleft (window) is the form-icon. Go to your form and fill the property "icon" with the same icon; problem solved. You don't need to put the icon in the outputfolder (that's just for setups).
I had the same problem. I followed the steps to change the icon but it always installed the default icon.
FIX: After I did the above, I rebuilt the solution by going to build on the Visual Studio menu bar and clicking on 'rebuild solution' and it worked!
you should put your icon on the project folder, before build it
If your designated icon shows when you run the EXE but not when you run it from Visual Studio, then, for a WPF project add the following at the top of your XAML: Icon="Images\MyIcon.ico". Put this just where you have the Title, and xmlns definitions. (Assuming you have an Images folder in your project, and that you added MyIcon.ico there).
The Icon property for a project specifies the icon file (.ico) that will be displayed for the compiled application in Windows Explorer and in the Windows taskbar.
The Icon property can be accessed in the Application pane of the Project Designer; it contains a list of icons that have been added to a project either as resources or as content files.
To specify an application icon
- With a project selected in Solution Explorer, on the Project menu click Properties.
- Select the Application pane.
- Select an icon (.ico) file from the Icon drop-down list.
To specify an application icon and add it to your project
- With a project selected in Solution Explorer, on the Project menu, click Properties.
- Select the Application pane.
- Select Browse from the Icon drop-down list and browse to the location of the icon file that you want.
The icon file is added to your project as a content file and can be seen on top left corner.
And if you want to show separate icons for every form you have to go to each form's properties, select icon attribute and browse for an icon you want.
Here's MSDN link for the same purpose...
Hope this helps.
Go to form's properties, ICON ... Choose an icon you want.
EDIT: try this
And read this one icons
Source: Stackoverflow.com