Click here to Skip to main content
15,945,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
This is regarding the expander controls in WPF (C#). I have two levels of expanders in my application (Main expander @the 1st level/Children expanders @the 2nd level). I need to make only one expander in the children expander expanded at any given time. The others should be in collapsed status (Only Headers visible). But before any expander is expanded, I need to collapse the already opened expander. i.e Collpase old before expanding new. But the Collapse and expand happens simultaneously at the same time in the present implementation. Please let know if this is possible....

Thanks in Advance
SivCho.
Posted
Comments
Sergey Alexandrovich Kryukov 16-May-13 10:48am    
Just one advice, pretty fuzzy because I cannot see your design. You have two levels of hierarchy expressed by the same tool: the expander. It can confuse the user. You could have two different ways of showing hierarchy, only one of them being the expander.
—SA
Coder.86 16-May-13 11:27am    
Hi Sergey, Thanks for commenting on it. The requirement here is - we need to show 2 levels of headers and the 2nd level header will have leaf nodes (the data), example - Level1 has Country, Level 2 has State, State will expand to show list of cities in it. Basically we are trying to mimic the Accordion control functionality using the Expander by employing two levels of Expander controls. Is there any better idea on this and for me till this point - Expander fulfills it except the above mentioned in my actual question. I used the animation provided in this article - http://www.codeproject.com/Articles/248112/Templating-WPF-Expander-Control

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900