As can be seen in the SimpleMDI Caliburn Micro project there are some conventions that bind the selectionEvent in tabControls to the ActivateItem in a Conductor. I can’t really see any mention of what this event might be.
However when you have a control that doesn’t fullfill these convention I’m lost on how to manage them myself.
I have a Telerik RadTreeView that I want to manage with a conductor to be able to load on demand the childs of nodes (via WCF call).
Here is where I am at:
<telerik:RadTreeView x:Name="Items"
cal:Message.Attach="[Event Selected] = [ActivateItem($dataContext)]" />
Passing $dataContext is wrong because that way he passes the Conductor itself, $SelectedItem returns null.
So my rather simple question is threefold.
1) If RadTreeView is a Selecetor why doesn’t the basic CM convention work with it,
2) What event should I use to call ActiveItem
3) What could I pass in.
This might help understand the different approaches to doing treeviews and mvvm.
I was using the RadTreeView also and I ended up sending the events to the ViewModel that hosted the
Itemscollection ofTreeViewItemViewModel. When an action/event, for example, Edit, was sent to the MainViewModel, I had a method like:So this worked at any level in the tree and also worked for having different behaviors, checking to see if the interface for different things was implemented.
xaml for the RadTreeView