WinExplorer View
- 5 minutes to read
Inspired by the Microsoft Windows Explorer UI, the WinExplorer View is tailored for displaying records with images and short captions. The WinExplorer View ships with seven display modes to pick from, ranging from a simple list to a large image display. Coupled with sorting and grouping features, the WinExplorer View allows you to create highly customizable image galleries.
Display Modes
The WinExplorer View provides seven unique display modes seen in Microsoft Windows Explorer – Small, Medium, Large, Extra-large, List, Tiles, and Content. To switch the display mode, do one of the following:
Select the appropriate option using the View’s ActiveDisplayMode property;
Assign True to the Active property of the desired mode within the View’s DisplayModes property set.
Refer to the ActiveDisplayMode property description to learn about these display modes.
Item Set
As with standard grid Views, the WinExplorer View requires data items in order to display data. But unlike standard grid Views, which can display any number of View items for various record fields (like name, second name, photo, age, birth date, occupation, etc.), the WinExplorer View can visualize only five items (record elements) at one time:
Four data items: image, text, description, and check box;
One auxiliary item that applies data grouping. The header in each group includes a caption and an optional expand button to expand/collapse the group.
An item set specifies which items (record elements) are to be displayed and which View items correspond to them.
To display data in the WinExplorer View, you need to:
Create View items (TcxGridWinExplorerViewItem objects in unbound WinExplorer Views or TcxGridDBWinExplorerViewItem objects in data-aware WinExplorer Views);
Assign these View items to record elements using the item set exposed by the WinExplorer View’s ItemSet property.
The list below details each of these record elements and the corresponding ItemSet sub-properties.
Text (shown in any display mode). A short string of text that represents a record’s caption. Strings are provided by the View item assigned to the ItemSet.TextItem property.
Description (shown only in Tiles and Content display modes). A long string of text providing a record’s description. Strings are provided by the View item assigned to the ItemSet.DescriptionItem property.
Check box. A check box, displayed to the left of an image. Values are provided by the View item assigned to the ItemSet.CheckBoxItem property. Use the View’s OptionsView.ShowItemCheckBoxes property to switch the visibility of check boxes in all display modes.
Group. Applies record grouping to the WinExplorer View. Records are grouped against values provided by the View item assigned to the ItemSet.GroupItem property). Groups can be expanded/collapsed using expand buttons. Use the View’s OptionsView.ShowExpandButtons property to switch the button visibility.
Image (shown in any display mode). Four different image sizes: Small, Medium, Large, and Extra-large. See details on these sizes below.
Image Sizes
Depending on the currently active display mode and provided images, the WinExplorer View shows one of the following:
Small image (provided by the View item assigned to the ItemSet.SmallImageItem property). Alternatively, you can assign a View item that provides image indexes to the ItemSet.SmallImageIndexItem property to obtain small images from the View’s ImageSet.SmallImages list. Small images are used in SmallImages and List display modes. The default image size is 16x16 pixels.
Medium image (provided by the View item assigned to the ItemSet.MediumImageItem property). Alternatively, assign a View item that provides image indexes to the ItemSet.MediumImageIndexItem property to obtain medium images from the View’s ImageSet.MediumImages list. Medium images are used in MediumImages, Tiles, and Content display modes. The default image size is 48x48 pixels.
Large image (provided by the View item assigned to the ItemSet.LargeImageItem property). Alternatively, you can assign a View item that provides image indexes to the ItemSet.LargeImageIndexItem property to obtain small images from the View’s ImageSet.LargeImages list. Large images are used only in LargeImages display mode. The default image size is 96x96 pixels.
Extra-large image (provided by the View item assigned to the ItemSet.ExtraLargeImageItem property). Again, you can assign a View item that provides image indexes to the ItemSet.ExtraLargeImageIndexItem property to obtain extra-large images from the View’s ImageSet.ExtraLargeImages list. Extra-large images are used only in ExtraLargeImages display mode. The default image size is 256x256 pixels.
If the required image cannot be found, the WinExplorer View uses the next largest image size. If no bigger image is available, the View searches for a smaller image. For example, if Extra-large and Small images are available, and the View is currently in MediumImages display mode, Extra-large images are scaled down to a medium size, instead of scaling up Small images. This behavior is implemented to improve image quality. You can also manually change the default image size for each display mode using its ImageSize property. To access mode-specific settings, use the corresponding sub-property in the View’s DisplayModes property set.
Appearance Customization
As with other Views, the WinExplorer View provides style settings for:
The entire View (available via the View’s Styles property);
Individual View items (accessible using the Styles property of a View item). These style settings are applied to all record elements linked to this View item.
In addition, the WinExplorer View allows you to customize the following layout aspects:
Adjust indents between record elements in each display mode. To accomplish this, use a display mode’s Indents property set.
Switch the description visibility using a display mode’s ShowItemDescriptions property.
Adjust the record width to display more or less text from the descriptions using a display mode’s RecordWidth property.
Run the WinExplorerViewDemo shipped with the ExpressQuantumGrid Suite to see the WinExplorer View in action.