method works after the UI elements of the treeview have been generated and you are probably calling the method before that has happened. In case you declare your treeview items in XAML, you can simply set the IsExpanded
property of the root item to true
. Alternatively, you can listen for RadTreeView's ItemPrepared
event and programatically set the prepared item's IsExpanded
property to true
. In the second case you will only have to do this the first time the event occurs, because the event is fired for every item that is being rendered and after you expand the root item the event will be fired for every child item.
Let me know if this helps and please do not hesitate to ask if you have further questions.
the Telerik team