I’m using the Composite Application Guidelines (Version 2, Feb 2009).
I’ve built the Shell with one region, a Bootstrapper and an Employee Module with two views, both of which I want the RegionManager to add to one region in the shell.
However, only the last view added to the RegionManager is displayed in the region.
What do I need to change so that both views are shown in the Shell’s region?
namespace EmployeeModule { public class EmployeeModule : IModule { private readonly IRegionManager _regionManager; public EmployeeModule(IRegionManager regionManager) { _regionManager = regionManager; } public void Initialize() { _regionManager.RegisterViewWithRegion(Infrastructure.RegionNames.MainRegion, typeof(Views.EmployeesView.EmployeesView)); _regionManager.RegisterViewWithRegion(Infrastructure.RegionNames.MainRegion, typeof(Views.EmployeesListView.EmployeesListView)); } } }
Allow me to answer my own question:
The above RegionManager code works fine.
You have to take the width and height properties off of the UserControl element in your views, otherwise they cover each other up.