Hi,
I'm currently impelenting region adapters based on Karthiks template.
One thing that is stuck in my head:
This is an example module:
public class ModuleMap : IModule
{
private readonly IUnityContainer m_container;
public ModuleMap(IUnityContainer container)
{
m_container = container;
}
#region IModule Members
public void Initialize()
{
SetView();
}
#endregion
private void SetView()
{
var regionManager = m_container.Resolve<IRegionManager>();
var view = m_container.Resolve<ViewMap>();
regionManager.AddToRegion(RegionNames.Map, view);
}
}
When this is run the first time using LoadModule("ModuleMap"), everything works fine and the view is displayed as expected in the region. Now if the user closes the TabWindow containing the view and then wants to reopen it (for example from a menu), how do you do that as LoadMoudule("ModuleMap") doesnnt instantiate a new ModuleMap probably as it still exist in the MoudleManager.
In general how do you handle such closing and reopening of TabWindows with views using PRISM?