Version

WinListView Object Model

Infragistics always strives to extend functionality and flexibility through a coherent and sensible object model. Since quite a few properties exposed by WinListView™ only have relevance to one particular view, a different approach was taken than that of the intrinsic ListView control with regard to the organization of properties. The control exposes an object property for each of the different views which exposes properties that are relevant only to that view. This approach results in a cleaner object model, and is self-documenting in the sense that, if a developer wants to know how to switch on a feature for a particular view, he/she can access that view-specific property. These view-specific object properties are named ViewSettingsIcons , ViewSettingsTiles , ViewSettingsThumbnails , ViewSettingsList , and ViewSettingsDetails , and they correspond to the Icons, Tiles, Thumbnails, List, and Details setting of the View property, respectively.

Another improvement over the intrinsic ListView controls relates to the way in which WinListView deals with the display of images. Where the intrinsic ListView control realizes the display of images solely through the use of an ImageList, WinListView provides that functionality but also supports the display of images, completely independent of an ImageList, through the various Appearances exposed by the control. Furthermore, where the intrinsic ListView control bases image display on the "SmallImageList" and "LargeImageList" properties (which correspond in an arbitrary way to the different views supported by the control), WinListView exposes an ImageList property for each of the view-specific settings objects. WinListView also exposes an ImageSize property so the developer can more easily manage the images displayed for each of the views.

WinListView deviates from the intrinsic ListView control in another important aspect. Where the intrinsic ListView control allows the free-form addition of SubItems to an item (via the ListViewSubItemCollection’s Add method), WinListView takes a different approach. WinListView exposes a SubItemColumns collection (which corresponds to the intrinsic ListView’s Columns collection) to which members can be added via an Add method. Once a member is added to this collection, an item’s SubItems collection will automatically contain an entry for that column, and this entry is accessible through the same indexing method as that of an UltraGridRow’s Cells collection or an UltraTreeNode’s Nodes collection. The developer can use the same key that was supplied to the column to reference the associated sub-item. This approach is not only more inline with commonly accepted .NET programming practices, it also makes management of sub-items more coherent and straightforward.