The best way of controlling your view is by using MVVM pattern. This means you have a ViewModel class that posses some properties which are going to be bound to the view and control it in some aspects.
However if you want to spare the cost of creating such and objects (which I do not personally recommend you to do), you could manipulate the visual control itself. In your case, this means you should manually instruct the TreeView what to do. You could expand containers via code behind starting from the top level. When you expand an item you should wait until the child item to be created and added to the visual tree. This means you should listen to ItemPrepared event of the TreeView and check if the next item that needs to be expand is created. If so, you could continue expanding the rest of items down the path. Also you may need to call bring into (most probably you will use the BringIndexIntoView) view to the respective child of the just expanded item (in case your parent item has many children and the children of interest is not in the view port).
As you can see, this implementation is quite complex and there are many tricky parts related to asynchronous container creation.
All the best,
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>