As you said, the
EmployeesView of the UI Composition Quickstart contains a ContentControl called
HeaderPanel that is not marked as a region and its Content is explicitly set in the
The reason of this approach is that the content of the
HeaderPanel control does not need to be changed (it will always contain the same employees’ list), so you do not need to expose it as a region.
The other ContentControl is marked as a region because its content will be changed at runtime with views that belong to different modules (the
UIComposition.Modules.Project and UIComposition.Modules.Employees).
A region is usually used when you want to dynamically add or remove views to a known location in the application without being tightly coupled to the containing view (because you can access to
them only by knowing their names). Regions are specially useful when the views that you want to show are placed in different modules because enable a compositional pattern.
In this case, the EmployeesView would not make sense if the list of employees is not set, so the EmployeesView
pulls the view into that placeholder, as opposed to the view being pushed by a different controller into a region, where the EmployeesView would not have control on whether the view was actually placed inside it or not, and would have to use decoupled
(therefore more complex) means for communication with that view, when this is not really necessary.
For more information related to regions you can check the following article:
UI Composition QuickStart
Please let me know if this helps.