Im answering your post assuming that the tree is not dynamic.
The idea here is you have a viewstack with some children and
a tree to the left, depending on the selected tree item a child of
viewstack is shown. Here is the code to seleect the child of
viewstack to be displayed on click of an item in the tree.