<?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>Francis K. Cheung - All Comments</title><link>http://blogs.msdn.com/b/francischeung/</link><description>The journey of an agile programmer...</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418611</link><pubDate>Tue, 14 May 2013 20:42:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418611</guid><dc:creator>Terrence</dc:creator><description>&lt;p&gt;That is right, I remember you changing that in the video. &amp;nbsp;Thank you for your help.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418611" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418608</link><pubDate>Tue, 14 May 2013 20:27:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418608</guid><dc:creator>Francis Cheung-MSFT</dc:creator><description>&lt;p&gt;In your case it will be:&lt;/p&gt;
&lt;p&gt;protected override object Resolve(Type type)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return this.DIContainer.Resolve(type);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418608" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418606</link><pubDate>Tue, 14 May 2013 20:24:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418606</guid><dc:creator>Francis Cheung-MSFT</dc:creator><description>&lt;p&gt;3.Override the Resolve method on the App class so that it uses the container to resolve object instances from a type. &lt;/p&gt;
&lt;p&gt;protected override object Resolve(Type type)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return _container.Resolve(type);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418606" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418605</link><pubDate>Tue, 14 May 2013 20:22:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418605</guid><dc:creator>Francis Cheung-MSFT</dc:creator><description>&lt;p&gt;Your App.Xaml.cs, which I assume derives from MvvmAppBase, has an override of the Resolve method that should use the Unity DI container to perform the resolution. If your overridden Resolve method simply calls base.Resolve, you will get an exception because the MvvmAppBase will by default use Activator.CreateInstance. If you use the Unity container to resolve, the constructor parameters will be resolved by the container.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418605" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418603</link><pubDate>Tue, 14 May 2013 20:18:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418603</guid><dc:creator>Terrence</dc:creator><description>&lt;p&gt;		protected override void OnInitialize(IActivatedEventArgs args)&lt;/p&gt;
&lt;p&gt;		{&lt;/p&gt;
&lt;p&gt;			base.OnInitialize(args);&lt;/p&gt;
&lt;p&gt;			//ViewModelLocator.Register(typeof(StartPage).ToString(), () =&amp;gt; new StartPageViewModel(FlyoutService));&lt;/p&gt;
&lt;p&gt;			this.DIContainer.RegisterInstance(FlyoutService);&lt;/p&gt;
&lt;p&gt;		}&lt;/p&gt;
&lt;p&gt;		protected override object Resolve(Type type)&lt;/p&gt;
&lt;p&gt;		{&lt;/p&gt;
&lt;p&gt;			return base.Resolve(type);&lt;/p&gt;
&lt;p&gt;		}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418603" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418602</link><pubDate>Tue, 14 May 2013 20:16:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418602</guid><dc:creator>Terrence</dc:creator><description>&lt;p&gt;The resolve method is being called from the SetAutoWireViewModel Method&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418602" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418600</link><pubDate>Tue, 14 May 2013 20:15:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418600</guid><dc:creator>Terrence</dc:creator><description>&lt;p&gt;Yes, in fact it is blowing on the Reslove method, it can&amp;#39;t resolve StartPageViewModel because there is no paraless ctor.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418600" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418571</link><pubDate>Tue, 14 May 2013 19:18:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418571</guid><dc:creator>Francis Cheung-MSFT</dc:creator><description>&lt;p&gt;Terrence: Did you complete step #3 above, overriding the MvvmAppBase Resolve method?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418571" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Integrating a Dependency Injection Container</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/26/prism-for-windows-runtime-integrating-a-dependency-injection-container.aspx#10418567</link><pubDate>Tue, 14 May 2013 19:04:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10418567</guid><dc:creator>Terrence</dc:creator><description>&lt;p&gt;After removing the ViewModelLocator.Register line from the OnInitialize and adding the container.RegisterInstance(FlyoutService), it crashes, wanting the default constructor for the StartPageViewModel.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10418567" width="1" height="1"&gt;</description></item><item><title>re: Prism for Windows Runtime: Creating and showing a Flyout using the FlyoutService class</title><link>http://blogs.msdn.com/b/francischeung/archive/2013/04/25/prism-for-windows-runtime-creating-and-showing-a-flyout-using-the-flyoutservice-class.aspx#10417968</link><pubDate>Mon, 13 May 2013 00:26:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10417968</guid><dc:creator>shaggygi</dc:creator><description>&lt;p&gt;This worked. &amp;nbsp;Thanks again for the help.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10417968" width="1" height="1"&gt;</description></item></channel></rss>