0

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...

SharpShade
  • 1,761
  • 2
  • 32
  • 45
  • 1
    Start reading ... http://www.codeproject.com/Articles/124644/Basic-Understanding-of-Tree-View-in-WPF . Go step by step. First figure out how to create a tree view then expand on it...crawl before running :) That article is pretty decent in introducing you to the basics. – Viv May 31 '13 at 17:16
  • Ok I solved the problem :) I´ll post a code for future readers as soon as I can answer this question ;) Thanks for that article. It really helped a lot. – SharpShade May 31 '13 at 17:49

0 Answers0