Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Communicating between views in multitab application

$
0
0
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:
  1. 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 .
  2. The SearchViewModel is created and injected by Unity into the SearchView.
  3. Since the SearchView has FilterView and ResultView defined the FilterView and the ResultView objects is created.
  4. The FilterViewModel and the ResultViewModel is created and injected by Unity into the FilterView and into the ResultView.
It seems I should generate ID at the step 2, when the SearchViewModel is created. But I still not sure, if the FilterViewModel and the ResultViewModel will be created by the SearchView and by the FilterView but not by the SearchViewModel, how I can access to these view models from the SearchViewModel to pass shared ID?

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>
...

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>