C#: Load TreeView with Images in UserControl WinForm

teime781

New Member
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 \[code\]Global\[/code\] \[code\]Files\[/code\] \[code\]Section\[/code\] and for \[code\]Data\[/code\]. Please explain to me with some snippet.\[code\]<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>\[/code\]
 
Back
Top