Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use .ico or .png as image source for Controls?

Tags:

icons

wpf

xaml

I am developing a WPF application with MS Ribbon Controls. I am uncertain what format of image file should I use for the Ribbon Controls - mainly between png and ico file format, and MSDN offers no preference or recommendation.

Take below as an example:

<ribbon:RibbonButton LargeImageSource="Images\foo.png" Label="Open Foo"/>

OR

<ribbon:RibbonButton LargeImageSource="Images\foo.ico" Label="Open Foo"/>

If I have a foo.png (32x32) and foo.ico containing one (32x32) icon, both seems to work with no difference.

I know .ico can contain an array of images, and there is size difference (.ico is much bigger in size than .png even if it contains only one icon), so my concern in its rendering in different version of Window (XP, Vista, 7, ME, 2000 etc.) and other difference that may effect the user experience which I am not aware of. Does anybody know?

like image 378
KMC Avatar asked Oct 10 '22 23:10

KMC


1 Answers

I would go with .png because they are generally easier to work with and there are far more tools available which support making nice .png files. I typically only use .ico files for the application icon.

I spent some time trying to deal with drop shadows and alpha blending on icons... Without the right tools this is nothing but frustration.

I don't know of any other compelling reason to make the choice though.

like image 81
John Laffoon Avatar answered Oct 14 '22 02:10

John Laffoon