Best practice for managing application icons...


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi,

I am getting an icon collection to use with my .NET projects, and wonder what is the best way to work with the icons, by having an Icon Library or just adding needed icons per form in an imagelist control?

Edhy Rijo

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Good question, I have added mine to my project via resource file.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This can get somewhat complicated as your application gets bigger...and inevitabely you end up adding the same icons to the same application more than once.  So what we try to do is create resource files within the projects that pertain to their purpose versus putting them all in the project resource file.  Also, when you import an image, be sure to set it to Embedded and then delete the icon or image file from teh resources folder (don't worry this is just copied over when added to the project and once embedded, you don't need it).

For example, I will create one icon resource file calle common that will have my Add, edit, delete type of icons that I will use over and over again.  Then when I choose the image on a control (aside from an Image Key, which I will get to) I will choose from the Local resources, choose the Common resource, select the image, and done.  This is also realy nice so if you want to change your Add image down the road....you only have to go to one place.

Next, when using an image control, it is best to programmatically load the control.  This is actually so that the images to not degrade fter a few builds.  If you'll notice, the images will eventually e at a 256 quality (or worse in some cases) if the images are added to the image list through the designer.  It may not show up immediately, but they will eventually start to look bad.  So I generally create a method called LoadImages and jut programmatically loads the images into the control from my resource files ( just one image per line usually).  This way my icons always look crisp and clean....so this will probably be a future SF control so that this won't happen, but for now this is really the best way.  Then you can just assign the image keys and/or indexes when using an image list control.

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Trent, Keith,

I will try adding the additional resource files to use the new icons.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search