How to change the icon that will be displayed on taskbar

1.6k Views Asked by At

In my WPF I set the application icon like below. Project property -> Application tab -> Resources Icon and manifest enter image description here

So I can see this icon on the wpf windows. but the icon of taskbar is default icon. How can I set it with application icon.

Application icon

enter image description here

Taskbar icon

enter image description here

2

There are 2 best solutions below

0
JS Guru On BEST ANSWER

My project is the packaged application of WPF app. In Images folder of Windows Application Packaging App, there are several default images. enter image description here

I replaced them with my custom images.

enter image description here

So that I could resolve the task bar icon problem.

1
awoodhead On

Setting the icon via XAML:

<Window
    ...
    Icon="nvicon.ico">
</Window>

Also be sure to build in release mode to double check your success, as there are some cases where a debug build does not apply icons (for reasons i do not know).