views:

51

answers:

1

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?

Edit:

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?

+2  A: 

Check the properties of your main Window project.. You should be able to set an icon there.

Setting an icon on your project

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?

Arcturus
thanks for the responce, but it works only when I run my application by .exe file. But when I run it in visual studio it doesn't work.I have updated my question for that.
viky
Updated the answer :)
Arcturus
If it's really bothering you go to the Debug tab in the project settings and uncheck "Enable the Visual Studio hosting process". This will debug against the app directly instead of using the intermediate vshost.exe file.
John Bowen
@John: thanks a lot!! Got something new!!!
viky