Avatar of corwin_ranger
corwin_ranger asked on

Selectively Expand/Collapse Silverlight TreeView Control

Is it possible to configure the TreeView control in the Silverlight tookit such that some or all of the hierarchy levels will be automatically expanded and ideally something that can't be collapsed at that level.

I'm using this control in large part due to the ease of handling hierarchical data and the ease with which I CAN expand/collapse levels. I'm being asked to do this selectively (i.e. only at the first level should I allow expand/collapse). I'm examining a Hierarchical Data Template to try and make this happen, but am having little luck and will certainly consider other options including a different control entirely if need be. My boss DOES want me to avoid having to purchase a control if at all possible.

Thanks in advance.

Cheers,

Steve
.NET ProgrammingMicrosoft Development

Avatar of undefined
Last Comment
corwin_ranger

8/22/2022 - Mon
Gautham Janardhan

when u are binding a tree view or for that matter any control the biggest mistake we all do is try to solve a problem from the point of view of the control. (i wasted abt 2 months on it) and we let go of the fact that every thing is possible via the object it self. like in ur case if u want a particular object to be expanded('object' not tree view item) what i'll do is create a property in the object saying isexpanded and then set the binding for the treeview ite,s is expanded property to this one, hence when ever i set the property of this object the tree view item which is the visual element will act accordingly
ASKER CERTIFIED SOLUTION
corwin_ranger

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck