Search code examples
c#wpfprismcal

Using PRISM, how do I display the view from another module, and access its properties to update its state?


I have two modules, one is a Header module, one is a Items module.

I have a HeaderDetails view, which contains a region which is called 'ItemsSummaryRegion'. This region is registered to populate the region with the view ItemListView from the Items module.

regionManager.RegisterViewWithRegion("ItemsSummaryRegion", typeof(IItemListView));

The issue is, how do I get access to this automatically generated view so that I may set the list of Items it is supposed to display? I want to set this in the ViewModel of the HeaderDetails view.

Does anyone know how you do this? Or can suggest a better way of displaying this data?

Thank you.


Solution

  • If your two modules are so tightly coupled, wouldn't it make more sense to have just one module containing both views, and to set them up with master/detail.

    This example shows something similar of what you are trying to achieve: http://www.tanguay.info/web/index.php?pg=codeExamples&id=105