MEF, WPF and injecting data templates

Feb 10, 2010 at 4:03 PM

I'm not sure if this will be of any use to anyone else however we had a scenario where we wanted to inject data templates into a window in WPF. The data templates will be written by third parties so we can't include the data templates directly in the window.

I've documented the approach we used at:

http://www.ilearnt.com/2010/02/i-learnt-how-to-inject-wpf.html

Feel free to suggest improvements or even laugh at the requirement to do this :)

 

Feb 12, 2010 at 6:37 PM

You may want to check the following sample,

it use different WPF composition style (including composition of data using data template)

http://cid-9bf7c1a515d76a9a.skydrive.live.com/self.aspx/Code%20Samples/MEF/SDP/WpfSdpShell.zip

the sample is written using VS 2010