Loading on demand

Topics: Prism v2 - WPF 3.5
Apr 18, 2009 at 5:31 AM
I am trying to load a module on demand using a configuration file, using the InitializeMode="OnDemand" attribute (and multiple variations). The best thing that I can get is and "Unrecognized attribute" error in a ConfigurationErrorsException. Using "[Module(ModuleName = "ModuleC", OnDemand = true)]" in the module file load the module regardless. Is this mechanism broken or am I just stupid?
Apr 20, 2009 at 8:42 PM

Hi Waday,

 

That is a bug in the Prism-v2 documentation. The correct attribute to use when initializing a module on demand from a configuration file is startupLoaded="false".

 

An example of this applied can be found in the source code of the ConfigurationModularity Quickstart, in the App.config file (the quickstart can be found in this path: ~DecompressionPath\Quickstarts\Modularity\ConfigurationModularity\ ConfigurationModularity.sln).

 

I will create a WorkItem in the issue tracker to report this bug.

 

Please let me know if this helps.

 

Damian Schenkelman

http://blogs.southworks.net/dschenkelman
Apr 20, 2009 at 8:44 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.