<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Prism 4 in Silverlight with MEF CompositionInitializer</title><link>http://blogs.msdn.com/b/bobbrum/archive/2010/11/22/prism-4-in-silverlight-with-mef-compositioninitializer.aspx</link><description>I’ve had a couple people ping me about how to use the MEF CompositionInitializer with Prism 4 in Silverlight as well as how to use multiple, remotely downloaded Prism modules with MEF.&amp;#160; I’ve put together a sample that shows both these things, you</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Prism 4 in Silverlight with MEF CompositionInitializer</title><link>http://blogs.msdn.com/b/bobbrum/archive/2010/11/22/prism-4-in-silverlight-with-mef-compositioninitializer.aspx#10154198</link><pubDate>Thu, 14 Apr 2011 22:04:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10154198</guid><dc:creator>Dragan Kovacevic</dc:creator><description>&lt;p&gt;Hey brumfb1,&lt;/p&gt;
&lt;p&gt;Thanks for simple and useful article. I needed that. I do have problem though. In my project when I try to inject view in module&amp;#39;s Initialize() method with &lt;/p&gt;
&lt;p&gt; &amp;nbsp;this.RegionManager.Regions[RegionNames.MainNavigationRegion].Add(new FillRateNavigationItemView());&lt;/p&gt;
&lt;p&gt;I get an exception because regions are not created. I think that I implemented everything like in your example. I do have one diference though. I am using ConfigureAggregateCatalog like in a example above instead CreateModuleCatalog like in your example. I am not even sure why I do that. &lt;/p&gt;
&lt;p&gt;Would you guys know why the regions are not created at that time?&lt;/p&gt;
&lt;p&gt;Thanks, Dragan&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10154198" width="1" height="1"&gt;</description></item><item><title>re: Prism 4 in Silverlight with MEF CompositionInitializer</title><link>http://blogs.msdn.com/b/bobbrum/archive/2010/11/22/prism-4-in-silverlight-with-mef-compositioninitializer.aspx#10115209</link><pubDate>Thu, 13 Jan 2011 11:30:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10115209</guid><dc:creator>Michael Baarz</dc:creator><description>&lt;p&gt;@Reggie:&lt;/p&gt;
&lt;p&gt;Use something similar like the following code in your bootstrapper to create your AggregateCatalog manually:&lt;/p&gt;
&lt;p&gt;protected override void ConfigureAggregateCatalog()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;base.ConfigureAggregateCatalog();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(AppBootstrapper).Assembly));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(StatisticViewModelBase).Assembly));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;Greetings, Michael&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10115209" width="1" height="1"&gt;</description></item><item><title>re: Prism 4 in Silverlight with MEF CompositionInitializer</title><link>http://blogs.msdn.com/b/bobbrum/archive/2010/11/22/prism-4-in-silverlight-with-mef-compositioninitializer.aspx#10113793</link><pubDate>Mon, 10 Jan 2011 18:00:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10113793</guid><dc:creator>Reggie Chen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the example! I want to make the shared TimeService available in App.xaml.cs. &lt;/p&gt;
&lt;p&gt;Adding a reference&lt;/p&gt;
&lt;p&gt;[Import]&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public ITimeService ts { get; set; }&lt;/p&gt;
&lt;p&gt; to App class &amp;nbsp;create a &amp;quot;No valid exports were found that match the constrain...&amp;quot; error&lt;/p&gt;
&lt;p&gt;What need to be done to access the remote serivce module via its interface ( ITimeService ) ? I&amp;#39;ve tried several examples with or without CompositionInitializer(), they produce the same error of not finding the exports. It will be fine if I load the module explicitely from code via AggregateCatalog, but not through deployment catalog in XML. Why?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Reggie&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10113793" width="1" height="1"&gt;</description></item></channel></rss>