Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Prism/MEF: how to create nested components with regions

$
0
0

Hi,

Basically, when defining a control as a region, Prism needs to create a region and "adapt" it for the corresponding control. To do this,Prism has a collection of RegionAdapters registered. As out of the box,Prism provides the following RegionAdapters:

  • ContentControlRegionAdapter: Used to adapt a region to any control that inherits from theContentControl class. 
  • ItemsControlRegionAdapter: Used to adapt a region to any control that inherits from theItemsControl class.
  • SelectorRegionAdapter: Used to adapt a region to any control that inherits from theSelector class.

Based on my understanding, the cause of your problem is that you are defining aRibbon control as a region, but Ribbon does not inherit from any of the aforementioned classes. Hence, as there is noRegionAdapter registered for Ribbons, Prismis not able to create the region.

Prism allows you to define and add your own custom RegionAdaptersto add support for controls that are not supported by default (for exampleRibbons). You can find more information about RegionAdaptersand how to configure them in the following section of the Prism documentation:

Also, you might find the examples portrayed in the following thread useful in order to create aRegionAdapter for Ribbons:

Finally, if you want for Prism to provide a RibbonRegionAdapter as out of the box, you can vote in the following work item:

I hope you find this useful,

Damian Cherubini
http://blogs.southworks.net/dcherubini


Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>