This demo illustrates how the BindToXML method can be used to populate the DevExpress MVC TreeView with node information taken from an xml file. The source XML file contains hierarchical information about a set of classes and their members (properties, methods, events).
The MVC TreeView ships with the following data binding methods:
TreeView implements specific properties that point to the data fields containing necessary data. These are the TextField, ImageUrlField, NavigateUrlField, NameField and ToolTipField properties. If these properties are not defined, the TreeView is able to automatically bind to data fields whose names coincide with property names of a MVCxTreeViewNode object (such as the Text, ImageUrl, NavigateUrl, Name and ToolTip).
In this demo, the TextField, ImageUrlField, and NavigateUrlField properties are used to specify the names of data item attributes from which corresponding node settings are obtained. The NodeDataBound property is used to define a delegated method, changing the text style of nodes which represent classes (text is displayed in bold).