Tri-state Expand/Collapse

2 posts, 0 answers
  1. Gifer
    Gifer avatar
    11 posts
    Member since:
    Oct 2010

    Posted 08 Nov 2012 Link to this post

    Hi,

    I'm implementing a treeview that uses a HierarchicalDataTemplate to bind to a collection. The structure looks like this

    - Parent
          + Child
          - GrandChild
                GrandGrandChild
                GrandGrandChild

    What I would like to achive is a tri-state expand/collapse feature.
    The workflow is the following:

        1 - The user clicks on a Parent node once and it will expand it an show the Children nodes
        2 - The user clicks on that Parent node again (second time) and it will expand all Children and GrandChildren nodes
        3 - The user click on that Parent node again (third time) and it will collapse all the GranChildren and Children nodes.
    The Expander UI should look like this:
        
        1 State Node Expanded - A green arrow with a black border pointing to the East (after first click)
        2 State Node Expanded All- A green arrow with a black border pointing to the South-East (after the second click)
        3 State Node Collasped- A white arrow with a black border pointing to the East (after the third click)

    I wonder if this is all possible and any help would be really appreciated.

    Thanks
  2. Gifer
    Gifer avatar
    11 posts
    Member since:
    Oct 2010

    Posted 08 Nov 2012 Link to this post

    Nevermind, I was able to achive this by myself. Thanks.
  3. DevCraft banner
Back to Top