Question

I'm very new to Silverlight. I've downloaded VS 2010 so that I can mess around with silverlight in a more graphical way and without having to pay a ton of money for Expression Blend 3.. So please have mercy if this is an obvious question.

By default, in a tree view, all of the nodes are collapsed. I can get these to expand, but I want for them to always be expanded, but also not grayed out like they are when you disable the control. What's the easiest way of doing this? (I basically just don't want that expand/collapse button there)

Also, I dislike how much space the tree nodes take up. I just have one line of text in each node. I would like it to be a little less spaced out. Right now it looks about like triple spacing between it, and I'd like something closer to single spacing or 1.5 spacing.

Was it helpful?

Solution

In your .cs file your can call ExpandAll() on the your TreeView control.

You can use styles on each TreeViewItem to set the margin and padding to avoid the empty space.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top