Reputation: 25736
I'm new to Prism, and I tend to just do as in the samples I see; place the Regions inside an ItemsControl. I have read that more controls can be used for defining region, but not all. However, I haven't seen an overview on what controls can be used to define Prism regions and not. Is there a rule or a list to it?
<ItemsControl x:Name="MainRegion" Regions:RegionManager.RegionName="MainRegion" />
Upvotes: 4
Views: 3779
Reputation: 25650
This is from the documentation for "UI Composition" in the Composite Application Library:
Composite Application Library provides the following region adapters:
ContentControlRegionAdapter
,SelectorRegionAdapter
, andItemsControlRegionAdapter
. These adapters are meant to adapt controls derived fromContentControl
,Selector
, andItemsControl
, respectively. There is an additional adapter,TabControlRegionAdapter
, used in Silverlight because the Tab control does not derive fromSelector
as in WPF.
So, the game here in a nutshell is that these adapters work for any control that derives from these supported containers. For example, a TabControl
inherits from Selector
.
This is obviously not the limit. If you have a custom control that doesn't inherit from one of these controls, you can implement your own Region Adapter to support that control.
Hope this helps, Anderson
Upvotes: 6