Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF different Window Icon & Taskbar Icon

Tags:

.net

wpf

taskbar

Is it possible in WPF to have a different Icon for the Window and the Taskbar. In my special scenario I want to have a an Icon with transparency for the Window and one "Metro" Style (with colored Background) for the Taskbar.

Setting the Application-Icon different didn't work, Taskbar always shows the Window Icon.

Anybody can offer a solution?

like image 978
efkah Avatar asked Mar 18 '26 02:03

efkah


1 Answers

Since the Window icon always is 16px, and the Icon in the taskbar is larger (I don't know which size is used, but I would guess 32x32), you can make an icon which has different content for different sizes.

A standard icon is usually 64x64 or 48x48, and scaled down for the rest of the sizes. If you instead create one 48x48 icon, with a colored background, and one 16x16 icon with no background, your app will use the 16x icon for the window icon, and the 48x icon for the taskbar.

like image 112
AkselK Avatar answered Mar 20 '26 03:03

AkselK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!