There was several problems preventing things to work; also, there was some confusion around the shape of the view models, perhaps due to your attempts.
- Even if the model has changed, my original advice is still valid. The only difference is that the view is now (correclty) splitted into smaller ones.
The important points of my sample are the SelectedXXX properties (with the relative change notification) and the bi-directional binding against the SelectedItem properties.
The Panorama and the ListBox have (from a "semantic" point of view) the same behavior: both represents a set of items, one of which is "selected" (active). As a matter of fact, they both inherits from ItemsControl.
You basically just have to bind the ItemSource property to an observable collection in the VM to populate the list, and the SelectedItem property to a single property in the VM representing the active item.
Every time the user changes the currently active item, this change is reflected in the VM through the bi-directional binding; the same goes in backward direction: setting the property in the VM changes the selection in the view.
- You can avoid explicit bindings leveraging CM conventions; if you have an ItemsControl named Books, CM binds the ItemsSource property of the control to the Books property of the VM and the SelectedItem property to the SelectedBook.
- Inheriting your models from Conductor<>.Collection.OneActive is useful (other than to enforce the lifecycle of conducted screens) to avoid writing a tree-shaped VM. For example, the LibraryVM could be rewritten as:
public class LibraryViewModel : Conductor<CategoryViewModel>.Collection.OneActive
This class has the same shape of the original one, with a (typed) collection of CategoryVMs (.Items) and a current one (.ActiveItem).
- In order to access the selected book, you have to determine the selected category, first, then get the selected book from that one.
In other words, you just have to navigate your composite VM through the SelectedXXX properties.
- In order to invoke an action from the Application Bar, the action should live in the VM bound to the view containing the AppBar. In your scenario, the action should be in the ShellVM.
From there, you can access the currently selected book as I mentioned before.
Does it help?