I would like my tree to be fully expanded by default. So I am looking for a place to put RadTreeListView1.ExpandAll().
So far I have tested
So far I have tested
- GotFocus - which doesnt get called automatically.
- ItemPrepared - which get called on every item in the tree, but expandAll() doesnt expand the first node (the root node). The rest of the tree does fully expanded once I manually expand the root node.
- Loaded - which fires when the tree control is loaded, not its data.
I think I understand why ExpandAll() wasnt working for the root node. The tree control binds to just the root node as its ItemsSource.
In xmal...
ItemsSource="{Binding TreeListItemsSource}" |
In ViewModel...
public ObservableCollection<HierarchicalData> TreeListItemsSource { get; set; } |
And the TreeListItemsSource only has the root node. The rest of the tree is linked by Items property in each HierarchicalData object.