Tree Layout with multiple roots

2 posts, 0 answers
  1. Gary
    Gary avatar
    1 posts
    Member since:
    Mar 2014

    Posted 10 Mar 2014 Link to this post


    I'm trying to display a tree layout with multiple roots - in the sample I attached both "a" and "f" nodes are top level nodes - however only a gets arranged correctly. I was hoping the auto format display something more similar to the image in preferred.png

    How does the multiple roots work? is this its intention to specify nodes on the first level? The layout is better if I add a single top level node (called "start" in sample app - you have to uncomment the code), but I don't really want an unnecessary single top node.

    Any help would be really appreciated.

    Many Thanks

    Gary Howlett

    As cant post .zip sample files I placed on my OneDrive here
  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 13 Mar 2014 Link to this post

    Hello Gary,

    I can understand your requirements. Unfortunately, with the current implementation of the default tree layout you are not allowed to define more than one root of the tree. In your particular case you need to define two roots.

    The only way to achieve the desired layout with the default tree layout is to define a dummy node that will be the only root of your graph.

    Pavel R. Pavlov

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. DevCraft R3 2016 release webinar banner
Back to Top