This application is for my application. Please note that I have a conductor as another conductor. And I have an IHandle for each explorer to receive a message from it child.The message type is the same as I use the message only for navigation. My problem is that I pass the ShellView EventAggregator to these children.
What about the NewConnectionView EventAggregator? Since I use its EventAggregator to navigate the ShellView. And for him, children float on it ActiveItem.
How to separate these 2 EventAggregators in one ViewModel.
ShellView and NewConnectionView ==> Conductor.Collection.OneActive
+----------------------------------+ | ShellView |_|[]|x| +----------------------------------+ | +------------------------------+ | | | | | | | | | | | | | | | ActiveItem | | | | | | | | | | | | | | | +------------------------------+ | +----------------------------------+ / \ / \ / \ / \ / \ / \ / \ +----------------------------------+ +----------------------------------+ | NewConnectionView |_|[]|x| | ConnectionListView |_|[]|x| +----------------------------------+ +----------------------------------+ | +------------------------------+ | | TextBlock | | | ComboBox | V | | | +----------------------+ +-----+ | | +------------------------------+ | | | | | Btn | | | +------------------------------+ | | | | +-----+ | | | | | | | | +-----+ | | | | | | | | | Btn | | | | | | | | DataGrid | +-----+ | | | ActiveItem | | | | | +-----+ | | | | | | | | | Btn | | | | | | | | | +-----+ | | | | | | | | | | +------------------------------+ | | +----------------------+ | +----------------------------------+ +----------------------------------+ / \ / \ / \ / \ / \ / \ / \ +----------------------------------+ +----------------------------------+ | FileConnectionView |_|[]|x| | DatabaseConnectionView |_|[]|x| +----------------------------------+ +----------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +----------------------------------+ +----------------------------------+
Currently, my approach uses NewConnectionShellView (Screen) as the parent of the NewConnectionView (Explorer) to split the EventAggregator. But the problem is that I cannot get the DisplayName for children of NewConnectionView to appear in the main window (ShellView).
Please note that I do not use MEF. Is there any workaround?
+----------------------------------+ | ShellView |_|[]|x| +----------------------------------+ | +------------------------------+ | | | | | | | | | | | | | | | ActiveItem | | | | | | | | | | | | | | | +------------------------------+ | +----------------------------------+ / \ / \ / \ / \ / \ / \ / \ +----------------------------------+ +----------------------------------+ | NewConnectionShellView |_|[]|x| | ConnectionListView |_|[]|x| +----------------------------------+ +----------------------------------+ | +------------------------------+ | | TextBlock | | | | | | +----------------------+ +-----+ | | | | | | | | | Btn | | | | | | | | | +-----+ | | | | | | | | +-----+ | | | | | | | | | Btn | | | | | | | | DataGrid | +-----+ | | | ActiveItem | | | | | +-----+ | | | | | | | | | Btn | | | | | | | | | +-----+ | | | | | | | | | | +------------------------------+ | | +----------------------+ | +----------------------------------+ +----------------------------------+ | | | | | | | | V +----------------------------------+ | NewConnectionView |_|[]|x| +----------------------------------+ | +------------------------------+ | | | ComboBox | V | | | +------------------------------+ | | +------------------------------+ | | | | | | | | | | | | | | | ActiveItem | | | | | | | | | | | | | | | +------------------------------+ | +----------------------------------+ / \ / \ / \ / \ / \ / \ / \ +----------------------------------+ +----------------------------------+ | FileConnectionView |_|[]|x| | DatabaseConnectionView |_|[]|x| +----------------------------------+ +----------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +----------------------------------+ +----------------------------------+
source share