i followed the tutorial here: http://www.wpf-tutorial.com/treeview-control/treeview-data-binding-multiple-templates/
in order to populate my treeview
and here is the screenshot of the program.
in my program i need to create xml based from treeview
this is how to xml output should look like
<div TYPE="BODY_CONTENT">
<div TYPE="PARAGRAPH" ORDER="1">
<div TYPE="TEXT">
<fptr>
<area name="John Doe"/>
<area name="Jane Doe"/>
<area name="Sammy Doe"/>
</fptr>
</div>
</div>
<div TYPE="PARAGRAPH" ORDER="2">
<div TYPE="TEXT">
<fptr>
<area name="Mark Moe"/>
<area name="Norma Moe"/>
</fptr>
</div>
</div>
</div>
i know a little bit of how to create an xml(based from those who answer my questions here, i have ask a lot of xml related question) but i haven't experience how to create this kind of xml.
so far i only have the loop for the treeview
foreach (Family item in trvFamilies.Items)
{
foreach (var itm in item.Members)
{
Console.WriteLine(itm.Name);
}
}
in the xml. the order is based from parent of the treeview
and the values inside fptr tags came from the child node of each parent node in the treeview