Downloads: July 2008 Archives

Crystal Image Toolkit 0.81 is ready to download.

New Feature: Header group items are now part of CrystalCollector, CrystalImageGridModel, and CrystalImageGridView.  You can now assign a group of thumbnail images to a collapsible header.  To illustrate this, here’s a screenshot from the demo application “HeaderGroupItemDemo” which is included in the project:

HeaderGroupItem1

There are four header groups visible that you can see here (FF, Hulk, Iron Man, Spider-Man).  Each contains a set of thumbnails.  The arrow icon indicates the expanded state; you can replace this icon in the framework as I am just using a free icon here.  Likewise you can replace the folder icon to represent something unique about this group of images if you wish.  But what’s important to note here is that the header group can be collapsed/expanded by clicking on it:

HeaderGroupItemCollapsed

Here I’ve collapsed two of the header items and left the other ones open.  You can see I have CrystalImageItem objects selected in each of the header groups.

In the C# code, Header groups translates to a CrystalGroupItem object containing a List of CrystalImageItem objects.  Each object now has a Parent property so it knows the group that it belongs to.  The biggest change in the collector is that now every GridModel has at least one root header. In the default mode, for backward compatibility, the header item is not displayed (ShowHeaders is set to false in CrystalImageGridView). This may cause problems in older applications that use CrystalImageGridView and try to navigate to item 0 in the GridModel.  You will need to do a test, such as: "if (theImage is CrystalGroupItem)".  See InitInitialImageImp in CrystalPictureShowController.cs for how to deal with this situation.

CrystalCollector now has an additional abstract method that requires you to CollectImages on a CrystalGroupItem object.  CrystalFileCollector implements this method and creates a default root header for simplicity.  But if you want to explicitly create CrystalGroupItem objects and add them to the collector, you do it like this:

   1: CrystalGroupItem groupItem = new CrystalGroupItem();

   2: groupItem.ImageName = "Fantastic Four";

   3: groupItem.ImageLocation = "..\\..\\SampleImages\\Fantastic Four";

   4: // Optional: set a unique image icon for this group header item in the image grid.

   5: //groupItem.FullImage = my Image icon;

   6: _theCollector.CollectImages(groupItem);


This is a bit of an early release of the header group feature.  In the future, I will add additional style bits for the header text font, add a border state around the header item, perhaps add mouse over events for it.

There are several bug fixes to the toolkit, which is why I wanted to release it now, even though this feature is a bit early.  To see all the bug fixes, please read the release notes in the zip file.

Download: Crystal Image Toolkit 0.81.  Totally free, open-source, C# .NET Framework 2.0 for Windows Forms.