This is a migrated thread and some comments may be shown as answers.

Tri-state Expand/Collapse

1 Answer 102 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gifer
Top achievements
Rank 1
Gifer asked on 08 Nov 2012, 07:15 PM
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

1 Answer, 1 is accepted

Sort by
0
Gifer
Top achievements
Rank 1
answered on 09 Nov 2012, 12:18 AM
Nevermind, I was able to achive this by myself. Thanks.
Tags
TreeView
Asked by
Gifer
Top achievements
Rank 1
Answers by
Gifer
Top achievements
Rank 1
Share this question
or