efkah
efkah

Reputation: 1790

WPF different Window Icon & Taskbar Icon

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?

Upvotes: 3

Views: 1737

Answers (1)

AkselK
AkselK

Reputation: 2593

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.

Upvotes: 2

Related Questions