I am working on a Wpf desktop application, whenever i run my application it shows me a window and associated tab in the task bar(Normal windows feature). My problem is that the tab is using window's icon for unknown file-type, I tried with Icon property of Window, Icon gets assigned but still problem is when I run application, task bar Tab initially displays window's icon for unknown file-type and when window-load completes it changes to the Icon assigned. I want Icon there from beginning. Any help?
I tried with .csproj --> Properties --> Application Tab --> Icon and set it to a .ico file. It works but I need to run my application by .exe file. It doesn't work in development environment(while running through visual studio). I need to set Start-Project option then. Is there any other way to solve this problem?
If you want to change multiple aspects of the taskbar at one time, use Taskbar settings. Press and hold or right-click any empty space on the taskbar, and then select Taskbar settings. In the Taskbar settings, scroll to see the options for customizing, choosing icons, and much more.
Alternatively, if you hold Shift and right-click the icon on the taskbar, you get the standard Windows Explorer context menu, instead of the application jump list. Again, click Properties. From the Properties dialog, go to the Shortcut tab and click the Change Icon button. Select a new icon file by clicking Browse.
Check the properties of your main Window project.. You should be able to set an icon there.
Update: Is it such a problem that your icon does not show in debug mode? As long as it works when you deliver the program to your customer, its all alright, not?
On a side note: You could check some things though. Perhaps your icon is not included in your project, or it isnt copied when building to your Debug folder?
Update 2: You also need to set the Main Form's Icon for it to show in Debug. If you also set the icon for the main form, it will display in the Taskbar during Debug / Runtime.
I had a similar issue and google led me to this article. I forgot one simple thing, and that was my Main Form's Icon. If you also set the icon for the main form, it will display in the Taskbar during Debug / Runtime.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With