DlhSoft Hierarchical Data Library Documentation

Hierarchical Data Library contains Windows® client components such as TreeListView control:

·        TreeListView control is used to display and update a list of node items managed either by an internal NodeManager instance or by an instance provided by the developer through the NodeManagerSource property.

The NodeManager component is used to perform node management business logic, such as ensuring that node indentation is valid at all times, and computing node visibility based on node indentation and expansion.

Both the main control and the core manager component require setting the input item collection to manage through Items or ItemsSource properties, and expose corresponding ManagedNodes (or Nodes) properties representing their output. Whenever the input item collection is changed after the initialization, the output node collection is updated accordingly, ensuring validation, computing supplemental and overall properties, and applying appropriate side effects to other nodes when necessary.

The developer may control how the business logic is applied to the node items by setting or clearing values for data member identifying properties such as IndentationMemberPath, and IsExpandedMemberPath.

By default, the data member identifying properties are configured to use the members of the NodeItem class provided with the library.

If a custom node item type is used, it should provide properties similar to those listed below, and their names should be set to the appropriate data member identifying properties:

·        Indentation: The hierarchy is based on the indentation level values of the nodes, so that a node with a lower index in the collection and having a specific indentation level will become the parent node for the nodes with a higher index in the collection and having an increased indentation level;

·        IsExpanded: If a parent node is expanded its child nodes become visible. If a parent node is collapsed its child nodes become invisible.

To increase performance, the manager component can also be used with simple data management mode, that requires the developer to access and add, update, and remove managed entities using specific methods, such as the indexer, and Add, AddRange, Insert, InsertRange, RemoveAt, RemoveRangeAt, Remove, RemoveRange, and Clear.

Here are the most important types regarding data access and management and their usage:

·        EntityItem class (NodeItem): data objects that could serve as data source within controls or manager components when the standard data management mode is used;

·        SimpleEntityItem class (SimpleNodeItem): simple object definitions that are used to define entities to add within manager components when the simple data management mode is used;

·        Entity classes (such as Node): service objects either generated automatically (through data binding with validation, when standard data management mode is used) or manually defined (when simple data management mode is used), accessible using the indexers of the manager components.


The root assemblies and types that the library includes are listed below:

Hierarchical Data Controls (DlhSoft.HierarchicalData.Controls) assembly:

·        TreeListView control (DlhSoft.Windows.Controls namespace);

·        Hierarchical Data Core (DlhSoft.HierarchicalData.Core) assembly:

·        NodeManager component (DlhSoft.Windows.Data namespace).

Note that the root assemblies may have internal references to a few dependency assemblies, but only the root assemblies and types listed above would be licensed by purchasing a license for this product.

For your information, these are the dependency assemblies used by each of the root assemblies:

Hierarchical Data Controls (DlhSoft.HierarchicalData.Controls) assembly:

·        Hierarchical Data Core (DlhSoft.HierarchicalData.Core) dependency assembly;

·        Data Controls (DlhSoft.Data.Controls) dependency assembly;

·        Data Core (DlhSoft.Data.Core) dependency assembly;

·        Hierarchical Data Core (DlhSoft.HierarchicalData.Core) assembly:

·        Data Core (DlhSoft.Data.Core) dependency assembly.

Get Started

To add references to the library assemblies within your solution project using Visual Studio®, please follow these steps:

·        Select your project in Solution Explorer;

·        Use the Add Reference command from the Project menu to open the Add Reference dialog window;

·        Locate and select the assemblies you want to reference within the .NET tab of the Add Reference dialog window;

·        Click OK to close the dialog window. The assemblies are referenced in your project.

Note that in some situations, such as within a Windows® Presentation Foundation (WPF) application, you should add references to the appropriate dependency assemblies of each used assembly also.

To be able to specify the referenced type names in your main source code without any DlhSoft namespace prefix, make sure you also include using or Imports directives and/or xmlns definitions for the appropriate namespaces in each of the referencing source code files.

To add the library Windows® Presentation Framework (WPF) controls as reference shortcuts in a Toolbox group within Visual Studio®, and to create control instances in the WPF user interface designer using the Toolbox, please follow these steps:

·        Open the WPF user interface designer for a window, page, or another element that you want to add controls to;

·        Open the Toolbox and display its context menu;

·        Use the Add Tab command from the context menu to create a new group, such as DlhSoft, if the group you want to add the controls to doesn't already exist;

·        Select the tab you want to add the WPF controls to and display its context menu;

·        Use the Choose Items command from the context menu to open the Choose Toolbox Items dialog window;

·        Locate and select the controls you want to add within the WPF Components tab of the Choose Toolbox Items dialog window;

·        Click OK to close the dialog window. The controls are added to your Toolbox group;

·        Double click a control reference shortcut icon from the Toolbox group to create an instance of that control within your window, page, or other element that is open in the WPF user interface designer.