Extending modularity approach of PRISM (CompositeWPF)

Topics: Prism v2 - WPF 3.5
Jan 21, 2010 at 8:50 AM

The native PRISM's modulariy mechanism support loading modules by path to assembly, containing this module. I want to have availability to store modules' views (XAML) in database in order end user could change and customize them. Database is chosen as it is simpler to store and retrieve information and requires no recompilation and making of binaries. The problem is that View consists of XAML and codebehind and we need to divide(?) them and store separately and when we need them we must clue them and load to module (with reflection or something else?) but I don't know how and if it is possible at all?

Jan 22, 2010 at 1:08 PM

Hi,

Prism does not provide any support for this particular scenario. You could try asking this question in the WPF forum, where you might get a thorough response as how this can be done with WPF.

To avoid the issue with the code behind, you could use automatic data templates (explained here). In the "RegisterResources" piece from the blog post, you would probably need to download and cache the xaml, and register a path to it.

I hope this helps.

Damian Schenkelman
http://blogs.southworks.net/dschenkelman