This question is locked. New answers and comments are not allowed.
I'm using the 'ItemTemplate' for the RadTreeView control like this:
I'm wondering, within my "node" template, how can I get set whether the node IsExpanded of not. Like the way you could do it if you were using:
Do I have to wrap my templated XAML in something. Putting a RadTreeViewItem within the template caused the control to crash, so I'm not sure what the right way is to approach this.
Thanks for your help!
<UserControl.Resources> |
<!--Tree Node--> |
<tcore:HierarchicalDataTemplate x:Key="node"> |
<StackPanel Orientation="Horizontal"> |
<Image Source="{Binding Icon}" Margin=" 0,0,6,0" /> |
<TextBlock Text="{Binding Text}" /> |
</StackPanel> |
</tcore:HierarchicalDataTemplate> |
</UserControl.Resources> |
<!--TreeView--> |
<t:RadTreeView |
ItemsSource="{Binding Nodes}" |
ItemTemplate="{StaticResource node}" |
IsLineEnabled="True" /> |
I'm wondering, within my "node" template, how can I get set whether the node IsExpanded of not. Like the way you could do it if you were using:
<t:RadTreeViewItem |
DefaultImageSrc="{Binding Icon}" |
Header="{Binding Text}" |
IsExpanded="True" ItemsSource="{Binding Children}" /> |
Do I have to wrap my templated XAML in something. Putting a RadTreeViewItem within the template caused the control to crash, so I'm not sure what the right way is to approach this.
Thanks for your help!