Prism 4 - locally scoped RegionManager

前端 未结 2 562
半阙折子戏
半阙折子戏 2021-02-09 19:07

I have silverlight 4 application with PRISM 4, I\'m using MEF.

My Shell defines one main region in which modules are loaded, I want modules to have their own RegionManag

2条回答
  •  -上瘾入骨i
    2021-02-09 19:53

    If you read the next line in the documentation it says "The Add method will return the new RegionManager that the view can retain for further access to the local scope."

    so I would create a property in the view and pass the IRegionManger to it.

    inside your view/viewModel.

    public IRegionManager rm { get; set; }
    

    then pass the IregionManager which was returned after adding the new view

    view.rm = detailsRegionManager;
    

    Hope that helps.

提交回复
热议问题