I have a simple RadTreeView that is defined like this:
<
telerik:RadTreeView
x:Name
=
"contextTree"
Margin
=
"8"
ItemsSource
=
"{Binding Hierarchy, Mode=TwoWay}"
>
<
telerik:RadTreeView.ItemTemplate
>
<
HierarchicalDataTemplate
ItemsSource
=
"{Binding Children}"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
HierarchicalDataTemplate
>
</
telerik:RadTreeView.ItemTemplate
>
</
telerik:RadTreeView
>
My Hierarchy is an ObservableCollection of a HierarchyContext object that has an ID, Name, Role, ParentID and Children properties.
I would like to have all nodes in the collection Expanded by default. I'd also like to be able to control if each node is expanded through Code. I assume I'd need to add a "IsExpanded" bool? property to my object but, can you give me an example of how to do this?
Thanks, Joel.