Log in

View Full Version : Resco AdvancedList Control 2.1 for .NET CF


Jimmy Dodd
01-17-2005, 06:00 PM
<img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_opening.gif" /> <br /><br /><b>Product Category:</b> Development Tool<br /><b>Manufacturer:</b> <a href="http://resco-net.com">Resco, Ltd.</a><br /><b>Where to Buy:</b> AdvancedList 2.1 can be purchased directly from <a href="http://www.resco-net.com/developer/advancedlist/pricing.asp">Resco</a><br /><b>Price:</b> Standard Edition $99.95 USD, Professional Edition $299.95 USD, Professional Edition Site License $899.95 USD (see the web site for additional information on editions)<br /><b>System Requirements:</b> The AdvancedList control works with the .NET CF and integrates with Microsoft Visual Studio .NET 2003.<br /><br /><b>Pros:</b><li>Completely integrates with Visual Studio .NET 2003;<br /><li>Extremely flexible approach to displaying multi-formatted lists of data;<br /><li>Works with both .NET CF and .NET v 1.1.<b>Cons:</b><li>No built-in editing capabilities.<br /><b>Summary:</b><br />Resco's AdvancedList Professional 2.1 is a control for use with both the .NET Compact Framework as well as the full .NET v 1.1 framework. It provides a more versatile alternative for developers to the standard listbox, listview, and data grid controls for displaying lists of data.<br /> <br />Read on for the full review!<!><br /><PAGEBREAK><br /><span><b>Overview</b></span><br />Microsoft Windows' user interface has always provided list controls for displaying multiple items in an ordered fashion. Originally limited to the Listbox, Microsoft later added the ListView, and then finally the DataGrid control to the standard control toolbox in an effort to provide developers greater flexibility in displaying data in a limited space. The limitations of the Pocket PC in terms of screen size and processor power make it even more problematic for displaying lists of data in a meaningful way. Add to this the limitations imposed on displaying images along with text strings in the standard .NET controls and one is tempted to give up on the .NET Compact Framework entirely. Resco's AdvancedList control for the .NET Compact Framework takes the original concept of the listbox and extends its display abilities in new and useful ways to address these limitations and more.<br /><br /><span><b>Installation</b></span><br />Installation of the control is very simple. Unzipping the downloaded file results in a Microsoft Windows Installer file named <i>advancedlistprof.msi</i>. Double-clicking this file launches the installation process which installs the needed dlls and performs the integration of the control and the help files with Visual Studio .NET 2003. Once this is complete the control will be visible in the toolbox for any Smart Device solution or Windows Application solution. Note that in this review, we will concentrate on Smart Device applications only, although most features work equally well on either platform.<br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_toolbox.gif" /> <br /><i>Figure 1: The AdvancedList installed in the Visual Studio .NET toolbox.</i><br /><PAGEBREAK><br /><span><b>The Control</b></span><br />Developing a user interface with the AdvancedList control begins with the usual method of dragging and dropping the control from the toolbox onto a Windows Form. Doing so instantiates an AdvancedList class object as a member of the Form and displays a simple rectangular control which can be sized and positioned within the containing Form as normal. Background and foreground colors and the presence of a border can also be modified.<br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_form.gif" /> <br /><i>Figure 2: The AdvancedList control on a form.</i><br /><br />From there the AdvancedList uses a very different means of defining the look of the control. Whereas most list and grid controls use properties of the control itself to define the presentation of the data, the AdvancedList control uses an entirely different class to do so. The RowTemplate is a class that specifies how an individual item will be displayed. The RowTemplate has properties such as BackColor, ForeColor, and Height which define the basic look of the row. <br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_properties.gif" /> <br /><i>Figure 3: The AdvancedList control properties box.</i><br /><br />The AdvancedList control allows you to define any number of Row Templates in a collection and assign these templates to the four different row types: default item rows, selected item rows, a header row, and a footer row. Having a separate template for selected items allows for user interface features that vary from selected items displaying a different background to displaying expanded detail on an item in a completely different format when the item is selected.<br /><br />The actual layout of the data in a Row Template is in turn defined by adding a set of Cell objects to the template. The base Cell class has properties such as background, foreground, size, and position, but is further subclassed into four subtypes which define what kind of content is displayed: ImageCell, TextCell, LinkCell, and SeparatorCell. <br /><br />This hierarchy of classes can be described entirely in code by creating new objects, setting their properties, and adding them to the child collection properties of other objects. An easier method is to lay out the RowTemplates and Cell objects at design time though the use of the AdvancedList control Designer. <br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_designer.gif" /> <br /><i>Figure 4: The AdvancedList control designer.</i><br /><br />Every aspect of the control, such as adding RowTemplates, arranging Cell objects, and specifying Event handlers for the control, can be set from the Designer. Properties of the control, the RowTemplates, and the Cells can be specified directly in properties. The Designer gives visual feedback through a sample of the current RowTemplate where size and position information can also be set directly via drag-and-drop.<br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_addtemplate.gif" /> <br /><i>Figure 5: Using the Designer to add a RowTemplate.</i><br /><br />The Designer is a separate application that can be executed with or without Visual Studio .NET. When launched from within Visual Studio changes made to the control are saved within the InitializeComponent method of the Form. Alternatively, the setup can be saved to an external XML file that can be loaded dynamically at runtime. <br /><br />When run outside of Visual Studio .NET the Designer is capable of opening, modifying, and saving AdvancedList XML files. As such, it can be shipped with your application and, if the application is designed to load the XML file at runtime, the look and feel of the application can be changed after shipping. Because every aspect of the control is available via the XML file, even properties such as data columns bound to Cell objects can be modified, added, or deleted. This level of flexibility isn't available in most controls outside of the Visual Studio environment. We'll look at the use of XML configuration files more later in this review.<br /><PAGEBREAK><br /><span><b>Cell Types</b></span><br />As has already been mentioned, the actual display objects of the control are defined using a series of Cell class objects. Each of these classes defines a set of properties that display data in a unique manner.<br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_addcell.gif" /> <br /><i>Figure 6: Cell types.</i><br /><br />Text Cell objects displays text, either a constant string or a text field from the datasource. The TextCell has properties that allow for defining the foreground and background colors, the font, and the alignment of text within the cell (both vertical and horizontal). Additionally, a format string which works like the String.Format( ) method can be specified which will allow further control of the text. This is especially useful when adding labels to the displayed text. <br /><br />Long text strings wrap automatically if the TextCell's height property is sufficiently large enough to accommodate it without cropping. Text strings that are too long to fit entirely within the TextCell are truncated on the right, but a small triangle is displayed to note the string continues beyond the cell boundary. Tap-and-holding on this triangle displays the entire string in a tool-tip like popup window. This is a nice feature and allows for conservation of screen space without losing access to the data. The use of a small triangle instead of an ellipsis saves space and stands out better than three periods as well.<br /><br />The Image Cell object uses its data value as an index into an ImageList and displays the associated bitmap image. Since Cells can overlap bitmap images can be used as background images for the entire row by setting all other cells background color to Transparent. <br /><br />The Link Cell displays its bound data as a hyperlink. In addition to the normal BackColor and ForeColor properties, the Link Cell contains ActiveColor and VisitedColor properties to show the state of the link. Tapping on a Link Cell fires a special LinkClick event on the AdvancedList control. <br /><br /><img src="http://www.pocketpcthoughts.com/images/web/2003/dodd_20041207_bitmapbackground.gif" /> <br /><i>Figure 7: Using Link Cells and a bitmap as a background.</i><br /><br />The Separator Cell simply provides a visual means of separating other cells vertically or horizontally.<br /><PAGEBREAK><br /><span><b>Events</b></span><br />The AdvancedList control fires several events in response to user actions. This makes the control not only very flexible as a data display, but also as an input control. In addition to the usual Paint, EnabledChanged, Got/LostFocus, Resize, and KeyPress style events, the AdvancedList control fires events for changing the active row, tapping on a cell, tapping on the header, tapping on a footer, tapping on a link cell, selecting a row, and tapping on the control in general. By differentiating between so many different user actions, the control can handle a great deal of the user interface on its own without having to resort to secondary controls such as menus or toolbars.<br /><br /><span><b>Data Binding</b></span><br />Binding the AdvancedList control to a DataTable or DataView is an easy, two-level process. Given a valid data adapter you simply set the DataSource member of the AdvancedList control to a valid DataTable or DataView object. Each Cell can then be bound to a specific column of the DataTable or DataView by ordinal number or by name. By using multiple RowTemplates with different Cell bindings different views of the data can be achieved with little programming effort.<br /><br />If using a DataTable or DataView is overkill for your application, the AdvancedList control can be bound to any simple IList-derived class, such as an Array or an ArrayList. By setting each cell of the template to the name of a member of the object in the list that member is displayed in the cell. This makes it extremely easy to use the AdvancedList control in a truly object oriented design without having to resort to more generic DataTable or DataView collections.<br /><br /><span><b>XML</b></span><br />One feature that seems to be standard across Resco's .NET CF components is the ability to use XML files to store configuration information. Both the property window in Visual Studio .NET and the AdvancedList Designer include two additional links: Load and Save. Save allows you to export the current configuration information to an XML file, while Load reads in a previously saved XML file. All of the control's properties are contained in these files, including the RowTemplate definitions and data bindings.<br /><br />Storing this information external to the application makes for easy modification of the look and feel of the application without having to recompile the source code. XML files can be edited by hand in any text editor, or a new layout can be created or modified in the AdvancedList Designer (with or without Visual Studio .NET) and copied to the device.<br /><br />Dynamically loading the XML file at runtime is very simple as the AdvancedList control class contains a method for doing just that.<br /><br /> <br /> StreamReader stream = new StreamReader(@"\Program Files\RescoTests\MyXml.xml");<br /> XmlTextReader reader = new XmlTextReader(stream);<br /> advancedList1.LoadXml(reader);<br /> <br /><PAGEBREAK><br /><span><b>Conclusions</b></span><br />Resco's AdvancedList integrates well with the Visual Studio .NET IDE. The installation is seamless and the online documentation (which integrates into the IDE's help system) covers the control completely. The use of the Designer is intuitive and surprisingly simple given the variety of the layouts that can be produced through the use of multiple RowTemplates and Cells, and the ability to run the Designer independantly of Visual Studio .NET is an added bonus. Despite all this flexibility the control is relatively small (just 84k) and very fast, both during load time and during usage. The ability to easily bind the control to data in multiple ways and to load configuration information from XML files makes the control a useful tool in a RAD environment. All in all, AdvancedList is a vast improvement over the standard list and grid controls and would make a fine addition to any developer's toolkit who needs to display any kind of data list.

Mike Temporale
01-23-2005, 02:30 PM
Resco's AdvacnedList is a great tool. Does this new version support the Smartphone yet? Last time I checked there was no support for Smartphone. :(

Jimmy Dodd
01-24-2005, 03:42 PM
Resco's AdvacnedList is a great tool. Does this new version support the Smartphone yet? Last time I checked there was no support for Smartphone. :(

According to the Resco website:

You can use it on any desktop computer with installed .NET Framework and on any mobile device that has support for .NET Compact Framework

This sounds like yes, but there is nothing specific mentioned on the Smartphone, and my own experience with developing for them is pretty close to nil. I'll see if I can run something in the emulator.