WinForms Image Collection and Updated Image-Icon Gallery

Thinking Out Loud
12 December 2014

As you probably know by now, v14.2 shipped last week and we've had some great feedback from many of you. Please keep them coming - we love to hear what you think and how you'd like us to move our WinForms product line forward in 2015. 

One of the features we did not discuss in-depth prior to our launch was the new Image Collection component and the updated Image Gallery. Let me take a minute to describe those now...

DevExpress Image Gallery Enhancements

Since the release of our Image Gallery in 2013, we've continued to add and refine our icon collection. Today, we ship over 1200 icons - both in color and grayscale forms. With this release we extended our icon collection with new Office 2013 inspired "flat" icons.

WinForms Office 2013 Flat Icons

Though these icons can be used across .NET platforms (WinForms, WPF, ASP.NET, MVC, etc), I want to focus on some of the usability changes we specifically made for WinForms developers...

We all know that one of the issues for large WinForms projects is effective icon management - avoiding icon duplication for solutions with multiple projects and forms. By default, Visual Studio does not offer a way to share icons between multiple WinForms projects and to use them without duplication. To state the obvious, icon duplication means that  you end up storing the same icons (such as Open.png, Save.png etc.) in dozens of places...inside form and project resources.

The problems associated with icon duplication includes the increase in assembly size, the impact in time whenever a change request is made and the errors that could arise as a result of a change. 

Sharing Icons between Projects - The Image Collection Component

Having stated the problem, let me describe the solution - our new Image Collection component. With it, you can now build a corporate-level icon assembly once and share it between all your projects and forms. The DevExpress Image Collection component allows you to use icons from this assembly without duplication - Your icon collection will always be in one storage. This resolves the problems I described above and perhaps most important, we've made creating the library extremely easy. Simply generate a class library project in Visual Studio and include your icons as Embedded Resources into it.

DevExpress Image Collection Step 1

To obtain access to your icon collection in other projects, reference the appropriate assembly.

DevExpress Image Collection Step 2

Drop the Image Collection component onto the design surface, and select ‘Load Images from Referenced Assemblies’ from the smart-tag menu.

DevExpress Image Collection Step 3

The following dialog allows you to select images from assemblies referenced by the project (except for system assemblies).

DevExpress Image Collection Step 4

The Image Collection will refer to images added by their identifiers which include the assembly name and image relative path. No binary data is copied to the form or project.

You can now bind the Image Collection to a DevExpress control and assign an image to the control element using image indexes in the same manner as the standard Microsoft Image List.

DevExpress Image Collection Step 5

So there it is - the Image Collection component. Now it's your turn, let me know what you think.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.