Avatar of 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.


.NET ProgrammingMicrosoft Development

Avatar of undefined
Last Comment
Avatar of Gautham Janardhan
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
Avatar of corwin_ranger

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo