Different regions sets: is it possible?

Topics: Prism v2 - Silverlight 2, Prism v2 - Silverlight 3
Aug 5, 2009 at 2:33 PM


It is the first time I use Prism.

I'm developing a large application in which there is not a unique regions composition. I mean, in some "screens" the shell is composed of some regions organized in a specific way; in other "screens" the shell is composed of regions organized in a different way.

What I have to do, cause in the shell I can define only one way to organize regions?

Thank you very much

Aug 5, 2009 at 4:31 PM

Hi Ors84bs, you can swap Views in and out of the main region.   This will permit you to effectively use whatever layouts that are required.

There is a flash demo, as well as source code, in the last message on the following thread that might give you some ideas (I show views being moved into different regions).   Patience will be required for the flash demo but is well worth the wait to see it in action.   I kept the SDMS project on codeplex even though it isn't an actively worked project because it contains source that may be of value to the community (the changeset for the demo is presented at the end of it)


These blogs may help you in your understanding of regions:



Aug 7, 2009 at 7:21 PM

Hi Ors84bs,

In a composite application the shell is not necessarily always the active window. "The shell is the main window of the application where the primary user interface (UI) content is contained. The shell may be composed of multiple windows if desired,...".
So in your scenario, you could also have several windows/screens each organized in the way you desire. Each window would then be a view composed of regions placed in different ways.

Depending on your scenario, you might find useful the following:

  1. PopupRegionBehavior from the StockTrader RI, which shows opens a new windows for specified regions.
  2. Scoped Regions if you need to have different region scopes for each screen.

 Hope it Helps!

Matias Bonaventura