Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Tree Node Headers
posted

I'd like my tree to open with a single root node - 'Subject Areas'.  When the node is expanded, the subject ares will be shown.  When a subject area is expanded, a node for 'Systems' might be displayed.  When the Systems node is expanded, all of the systems would be displayed.  Currently, my tree opens with a number of root nodes - each one representing a subject area.  How do I force that 'Subject Area' header into the root node?

Thank you.

Scott

Parents
  • 138253
    Verified Answer
    Offline posted

    Hello Scott,

     

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I defined a hierarchical data structure and then I added an additional class for the RootNode. It has a string Property and an ObservableCollection of my actual data. Then I create a collection with one item of this type and set it as ItemsSource of the XamDataTree. This way the tree has the structure you want. Please let me know if you need further assistance on this matter.

     

    Looking forward for your reply.

    XamDataTreeRootNode.zip
Reply Children