Skip to content

ATF Tree List Control Sample

Gary edited this page Mar 17, 2015 · 2 revisions

Table of Contents

Description

TreeListControl demonstrates the usage of TreeListControl/TreeListItemRenderer classes that can display and edit hierarchical data in a tree view with details in columns. This sample application does not use MEF or the ATF DOM and has no menus or tool buttons.

To learn about the programming of this sample, see Tree List Control Programming Discussion.

ATF Features Demonstrated by TreeListControl

  • Demonstrate using ATF's TreeListControl, which is a tree view on the left side; the right side has multiple columns to display data details for each tree item.
  • Use TreeControlAdapter to populate hierarchical data to the TreeListControl.
  • Open and load the CoolSUVs.xml file containing hierarchical SUV data by using the LINQ to XML API.
  • Use StringDataEditor to display and edit string values.
  • Use FloatDataEditor to display and edit float values (with optional slider support).
  • Use ColorDataEditor to showcase editing data values using an external, arbitrary control to pick colors.

Run TreeListControl

  1. Double-click the TreeListControl.exe in \bin\wws_atf\Release.
  2. A dialog appears displaying SUV data.

How to Use TreeListControl

You can edit SUV names under the area nodes, as well as their weights under the "Weight" column. In the "Color" column, click on one of the colors to display a color picker in which you can select a new color and click "OK" to display the new color in the main dialog. Drag the slider to change the MSRP value displayed. Changed values are not saved to the XML file.

TreeListControl Modules

Modules perform these functions:

  • Program.cs: Contains the Main program, which displays the Form.
  • Form1.cs: Form class that creates and sets up the TreeListControl. It opens and loads the CoolSUVs.xml file containing SUV data.
  • TreeView.cs: Provides a tree view of the XML document.

Topics in this section

Clone this wiki locally