<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Managing Application Resources when WPF is Hosted</title>
	<atom:link href="http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/feed/" rel="self" type="application/rss+xml" />
	<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/</link>
	<description>Drinking (and serving) the WPF Kool-Aid since 2002</description>
	<lastBuildDate>Mon, 30 Aug 2010 18:54:01 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: David Cunningham</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-2934</link>
		<dc:creator>David Cunningham</dc:creator>
		<pubDate>Mon, 31 May 2010 16:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-2934</guid>
		<description>Thanks for this, this is really handy.  Is there a good way to load code on startup for a non-startup assembly?  Say you refer to an assembly, and you want to it run a chunk of code as soon as it is loaded... is this possible?  I haven&#039;t found the right hook to do this.</description>
		<content:encoded><![CDATA[<p>Thanks for this, this is really handy.  Is there a good way to load code on startup for a non-startup assembly?  Say you refer to an assembly, and you want to it run a chunk of code as soon as it is loaded&#8230; is this possible?  I haven&#8217;t found the right hook to do this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-525</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Sun, 20 Dec 2009 05:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-525</guid>
		<description>Thanks Doc &amp; thanks to Tom Kludy as well, that extra tidbit was important to me, since I&#039;m hosting WPF inside Word via VSTO and I had windows coming and going. It fixed the &quot;The Application object is being shut down&quot; errors I was getting the second time I tried to open a window.</description>
		<content:encoded><![CDATA[<p>Thanks Doc &amp; thanks to Tom Kludy as well, that extra tidbit was important to me, since I&#8217;m hosting WPF inside Word via VSTO and I had windows coming and going. It fixed the &#8220;The Application object is being shut down&#8221; errors I was getting the second time I tried to open a window.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links for 2009-12-19 &#124; jensen</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-523</link>
		<dc:creator>Links for 2009-12-19 &#124; jensen</dc:creator>
		<pubDate>Sat, 19 Dec 2009 19:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-523</guid>
		<description>[...] Managing Application Resources when WPF is Hosted « Dr. WPF(tags: wpf resources runtime) [...]</description>
		<content:encoded><![CDATA[<p>[...] Managing Application Resources when WPF is Hosted « Dr. WPF(tags: wpf resources runtime) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-516</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Mon, 07 Dec 2009 23:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-516</guid>
		<description>Good call, Tom!  Yes, if you have windows coming and going, then the app&#039;s shutdown mode is very important in the hosted scenario, since the Application object does not necessarily know about all WPF windows.

Thanks for posting the tip! :D</description>
		<content:encoded><![CDATA[<p>Good call, Tom!  Yes, if you have windows coming and going, then the app&#8217;s shutdown mode is very important in the hosted scenario, since the Application object does not necessarily know about all WPF windows.</p>
<p>Thanks for posting the tip! <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Kludy</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-515</link>
		<dc:creator>Tom Kludy</dc:creator>
		<pubDate>Mon, 07 Dec 2009 22:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-515</guid>
		<description>Thanks for the info.  I found that the EnsureApplicationResources() method worked for me (WPF component hosted in MMC); however, the lifetime of the Application object is flaky.  I think it gets destroyed as soon as I open a WPF &quot;Window&quot; proper, and then close it.  The result was that the entire MMC window closed with no feedback - not even a caught exception under the debugger.

I was able to fix this by doing:

                new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown };

Then, when my snap-in is shutting down I explicitly call Application.Current.Shutdown().

I think this might also answer Colin&#039;s problem.  It&#039;s worth a try anyway.</description>
		<content:encoded><![CDATA[<p>Thanks for the info.  I found that the EnsureApplicationResources() method worked for me (WPF component hosted in MMC); however, the lifetime of the Application object is flaky.  I think it gets destroyed as soon as I open a WPF &#8220;Window&#8221; proper, and then close it.  The result was that the entire MMC window closed with no feedback &#8211; not even a caught exception under the debugger.</p>
<p>I was able to fix this by doing:</p>
<p>                new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown };</p>
<p>Then, when my snap-in is shutting down I explicitly call Application.Current.Shutdown().</p>
<p>I think this might also answer Colin&#8217;s problem.  It&#8217;s worth a try anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-120</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Thu, 13 Aug 2009 10:49:09 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-120</guid>
		<description>Wow! Good catch, Michael K! I&#039;m surprised no one else has reported that. It was definitely a bug.&lt;br&gt;&lt;br&gt;I updated the GetResourceDictionary() method with something that should work much better. Thanks for the heads up! :-)&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Wow! Good catch, Michael K! I&#8217;m surprised no one else has reported that. It was definitely a bug.</p>
<p>I updated the GetResourceDictionary() method with something that should work much better. Thanks for the heads up! <img src='http://drwpf.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Cheers,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael K.</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-119</link>
		<dc:creator>Michael K.</dc:creator>
		<pubDate>Wed, 12 Aug 2009 22:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-119</guid>
		<description>This is very handy, one question (maybe this has been mentioned?)&lt;br&gt;In your &quot;GetResourceDictionary&quot; method...&lt;br&gt;You basically set result = null, then if you can&#039;t find a dictionary in the collection with the parameter&#039;s name, you create one.&lt;br&gt;&lt;br&gt;What about the &quot;else&quot; condition where you DO already have it in the collection?&lt;br&gt;&lt;br&gt;Your method just returns null. Has nobody had this problem, or am I missing something?&lt;br&gt;&lt;br&gt;Shouldn&#039;t there be something like this in there?&lt;br&gt; if (_sharedDictionaries.ContainsKey(dictionaryName) &amp;&amp; _sharedDictionaries[dictionaryName].Target != null)&lt;br&gt; {&lt;br&gt; result = (ResourceDictionary)_sharedDictionaries[dictionaryName].Target;&lt;br&gt; }&lt;br&gt; return result;&lt;br&gt;&lt;br&gt;Please let me know if I did something wrong... thanks.</description>
		<content:encoded><![CDATA[<p>This is very handy, one question (maybe this has been mentioned?)<br />In your &#8220;GetResourceDictionary&#8221; method&#8230;<br />You basically set result = null, then if you can&#8217;t find a dictionary in the collection with the parameter&#8217;s name, you create one.</p>
<p>What about the &#8220;else&#8221; condition where you DO already have it in the collection?</p>
<p>Your method just returns null. Has nobody had this problem, or am I missing something?</p>
<p>Shouldn&#8217;t there be something like this in there?<br /> if (_sharedDictionaries.ContainsKey(dictionaryName) &#038;&#038; _sharedDictionaries[dictionaryName].Target != null)<br /> {<br /> result = (ResourceDictionary)_sharedDictionaries[dictionaryName].Target;<br /> }<br /> return result;</p>
<p>Please let me know if I did something wrong&#8230; thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-118</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 28 Jul 2009 10:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-118</guid>
		<description>Hey Doc,&lt;br&gt;&lt;br&gt;In regards to Collin&#039;s post... it happens to me when using VSTO and creating an Outlook addin.&lt;br&gt;&lt;br&gt;Michael</description>
		<content:encoded><![CDATA[<p>Hey Doc,</p>
<p>In regards to Collin&#8217;s post&#8230; it happens to me when using VSTO and creating an Outlook addin.</p>
<p>Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. WPF</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-113</link>
		<dc:creator>Dr. WPF</dc:creator>
		<pubDate>Thu, 11 Jun 2009 00:04:45 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-113</guid>
		<description>Hi Al,&lt;br&gt;&lt;br&gt;Silverlight is pretty much always hosted. Is there a particular hosting scenario you are trying to conquer where you are having trouble with resource resolution?&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;-dw</description>
		<content:encoded><![CDATA[<p>Hi Al,</p>
<p>Silverlight is pretty much always hosted. Is there a particular hosting scenario you are trying to conquer where you are having trouble with resource resolution?</p>
<p>Cheers,<br />-dw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://drwpf.com/blog/2007/10/05/managing-application-resources-when-wpf-is-hosted/comment-page-1/#comment-112</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Tue, 09 Jun 2009 02:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://drwpf.com/blog/?p=10#comment-112</guid>
		<description>Hi Dr. WPF,&lt;br&gt;&lt;br&gt;I am new to WPF and Silverlight. I know you are a doctor who specializes in WPF but I am hoping that you may have run across a few Silverlight courses during your studies. The Application.LoadComponent works a bit differently in Silverlight and I cannot seem to come up with a proper solution.&lt;br&gt;&lt;br&gt;Thanks for your help,&lt;br&gt;&lt;br&gt;Al&lt;br&gt;&lt;br&gt;</description>
		<content:encoded><![CDATA[<p>Hi Dr. WPF,</p>
<p>I am new to WPF and Silverlight. I know you are a doctor who specializes in WPF but I am hoping that you may have run across a few Silverlight courses during your studies. The Application.LoadComponent works a bit differently in Silverlight and I cannot seem to come up with a proper solution.</p>
<p>Thanks for your help,</p>
<p>Al</p>
]]></content:encoded>
	</item>
</channel>
</rss>
