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

New Post: How to create a separate XAP file using Prism/MEFBootstrapper for a complex Child Window?

$
0
0

Hi Warren,

Based on my understanding in order to avoid having a reference to the child window's project in the main project, you will have to export your child windows instances using a common interface defined in a common project. This interface for example could define a Show method (and any other required method in order to interact with yourChildWindows as needed when importing them through this interface.

Also, if you are importing this child windows for example in your shell's view model, you should have to use your[Import] attributes with AllowDefault=true and AllowRecomposition=true (e.g. like this [Import("myChildWindow1", AllowDefault = true, AllowRecomposition = true)], as this will allow you to change the value of the imported property after the initial composition, which will be required if you are loading the modules containing the exported classes on demand.

I created a small sample portraying this scenario, you can find it in my Skydrive account under the name "OnDemandChildWindowSample".

I hope you find this useful,

Agustin Adami
http://blogs.southworks.net/aadami


Viewing all articles
Browse latest Browse all 1878

Trending Articles



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