views:

621

answers:

1

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" />
+3  A: 

This is from the documentation for "UI Composition" in the Composite Application Library:

Composite Application Library provides the following region adapters: ContentControlRegionAdapter, SelectorRegionAdapter, and ItemsControlRegionAdapter. These adapters are meant to adapt controls derived from ContentControl, Selector, and ItemsControl, respectively. There is an additional adapter, TabControlRegionAdapter, used in Silverlight because the Tab control does not derive from Selector 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

Anderson Imes
Nice and clear. Just what I needed. Thx! :-)
stiank81