In the Winform, i have a UserControl TreeView and It loads real time data from XML file. The XML files loaded successfully in the treeView.
I want to generate TreeView with Different images for different sets of data. This link explains to generate treeview for specific array of data. [http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.imagelist][1]
How can I add different images for each parent and child nodes, in the XML, I want to add different images for Global Files Section and for Data. Please explain to me with some snippet.
<Global>
<Files name="Bit_RunvsDepth" >
<Section name="Linguini">
<Data>measured depth</Data>
</Section>
<Section name="Process">
<Data>Tree</Data>
<Section name="Arguments">
<Data>None</Data>
</Section>
<Section name="Extras">
<Data>0.01</Data>
<Data>Foodg</Data>
</Section>
</Section>
<Section name="Color">
<Data>0.0</Data>
</Section>
<Section name="MinScale">
<Data>0</Data>
</Section>
<Section name="MaxScale">
<Data>1000</Data>
</Section>
</Files>
</Global>
TreeNode class is not sealed, so you can build a hierarhy of custom node types.
To draw images TreeView relies on ImageView component. This link explains how to load images programmatically