I´m currently trying to create a language editing tool. The structure is like this:
<Sections>
<Section id="IDEWindow">
<Section id="Backstage">
<Section id="Tabs">
<Entry key="Main" value="Main" comment="" />
<Entry key="Pipeline" value="Pipeline" comment="" />
</Section>
<Section id="Buttons">
<Entry key="Exit" value="Beenden" comment="" />
</Section>
</Section>
</Section>
</Sections>
So, i´ve got an [LanguageFormat] object which contains a list of [LanguageFormatSection] objects. Those in turn contain a list of sub-sections as well as a list of [LanguageFormatEntries].
I know want my TreeView to automatically generate a tree if I set the "Language" property (type of [LanguageFormat]). I want to style the items by type, so my root node has a flag-icon and the culture name, the section has a folder-icon and the entry has just plain text.
How can i do this? Who can i describe WPF how to translate those .Net objects into a tree? How can i let WPF know that "Sections" and "Entries" should be child-nodes?
Thanks a lot, I´m totally lost here...