Hi Federico,
Thank you very much for reply.
I also have considered the idea about shared ID to setup relation between the FilterViewModel and the ResultViewModel.
But I still can't understand how to inject it to the view models...
As far as I can understand the initialization process will be following:
Are steps 3 & 4 correct? Am I doing something wrong?
I have defined the SearchView as
Thank you very much for reply.
I also have considered the idea about shared ID to setup relation between the FilterViewModel and the ResultViewModel.
But I still can't understand how to inject it to the view models...
As far as I can understand the initialization process will be following:
-
I call RequestNavigate to add the SearchView to the tab control ( WorkSpace region)
As alternative I can resolve the SearchView by Unity and add it to the WorkSpace region using RegionManager . -
The SearchViewModel is created and injected by Unity into the SearchView.
-
Since the SearchView has FilterView and ResultView defined the FilterView and the ResultView objects is created.
-
The FilterViewModel and the ResultViewModel is created and injected by Unity into the FilterView and into the ResultView.
Are steps 3 & 4 correct? Am I doing something wrong?
I have defined the SearchView as
...
<DockPanel LastChildFill="True">
<Expander Header="Search" IsExpanded="True" DockPanel.Dock="Top">
<v:FilterView />
</Expander>
<v:ResultView DockPanel.Dock="Bottom" />
</DockPanel>
...