开发者

Set application icon and window icon to Windows 7 friendly icon

I've created a WPF project in Visual Studio 2010 using .net 4.0

I've created an icon with many different sizes and formats right from 16x16 4 bit BMP up to 256x256 24 bit BMP. I set it as the program's icon in the property pages for the application, and as the window's icon in the icon propety on a WPF Window.

This works to a point. The icon is displayed in开发者_如何学Go all the expected location, however, it seems invariably to use one of th lower resolution images. In the task bar it apperas to be using a 16x16 image. In the folder if you view the exe file with it set to extra large icons it appears as a tiny image with lots of white space arround it, rather than choosing the large icon. Even if I set it up with a 256x256 icon as the only icon, it seems to scale it down, and then put it in the middle with lots of white space around it.


See here for some ideas. Also be sure to clean the icon cache (thumbs.db?) to see the updated icon in explorer.

Edit: IcoFx also behaved quite nicely in my tests.


You must set the image dpi to 96. Be Aware of DPI with Image PNGs in WPF - Images Scale Weird or are Blurry

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜