Using RegionManager in Non-Prism WPF application

Topics: Prism v2 - WPF 3.5
Mar 31, 2010 at 8:56 AM

Hi there,

   Can anybody let me know how to make use of the RegionManager component alone in a Non-Prism based WPF application (Normal WPF application). I would just like to use this feature from PRISM in one of my application. Is it possible? If so, any idea how to use it?




Apr 5, 2010 at 5:24 PM

Hi Ranjith,

It is possible to use the RegionManager and other UI Composition functionality in a WPF application that does not use other CAL components. In fact it should be possible (I have not tried it, but in some scenarios it might be worth taking some time to do it) to extract only the components used for UI Composition into a standalone assembly to decrease the application’s size.

Some of the things that you might want to consider when not using other usual components in Prism application, specifically a DI Container and the Bootstrapper:

  • You will be in charge of setting the RegionManager for your application’s Shell (which usually is done in the UnityBootstrapper).
  • You will be in charge of managing the different RegionManager instances, as there would be no container to hold them.

Please let me know if this helps.

Damian Schenkelman