<?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>Defining and Using Shared Resources in a Custom Control Library</title><link>http://blogs.msdn.com/wpfsdk/archive/2007/06/08/defining-and-using-shared-resources-in-a-custom-control-library.aspx</link><description>The question about how to define and use shared resources in a custom library has come up a couple times lately and after much discussion with the developer (thanks Varsha), here is the answer. When an application looks for a resource, it looks at three</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using Themes with Custom Controls</title><link>http://blogs.msdn.com/wpfsdk/archive/2007/06/08/defining-and-using-shared-resources-in-a-custom-control-library.aspx#4150611</link><pubDate>Tue, 31 Jul 2007 19:25:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4150611</guid><dc:creator>Windows Presentation Foundation SDK </dc:creator><description>&lt;p&gt;Last month I explained how to use shared resources in a control library . This month I’ll create an example&lt;/p&gt;
</description></item><item><title>Managing Application Resources when WPF is Hosted</title><link>http://blogs.msdn.com/wpfsdk/archive/2007/06/08/defining-and-using-shared-resources-in-a-custom-control-library.aspx#5313025</link><pubDate>Sat, 06 Oct 2007 13:46:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5313025</guid><dc:creator>Ask Dr. WPF</dc:creator><description>&lt;p&gt;Dear Dr. WPF, We are running into some issues around application level resources when we attempt to put WPF task pane UI within Office. The primary issue is that the runtime host is not WPF i ...&lt;/p&gt;
</description></item><item><title>Defining and Using Shared Resources</title><link>http://blogs.msdn.com/wpfsdk/archive/2007/06/08/defining-and-using-shared-resources-in-a-custom-control-library.aspx#9495351</link><pubDate>Sat, 21 Mar 2009 14:43:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9495351</guid><dc:creator>jbe2277</dc:creator><description>&lt;p&gt;The approach shown in this blog “Defining Resources at the Element Level” works fine at runtime. Unfortunately, it doesn’t work inside the Visual Studio WPF Designer (Cider). The Designer doesn’t load the code in the code-behind file and so the following code is never executed inside the Designer:&lt;/p&gt;
&lt;p&gt;public NumericUpDown()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;this.Resources.MergedDictionaries.Add(&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SharedDictionaryManager.SharedDictionary);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;InitializeComponent();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Alternative approaches that work with the designer are described here: &lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/CompositeExtensions/Thread/View.aspx?ThreadId=42919"&gt;http://www.codeplex.com/CompositeExtensions/Thread/View.aspx?ThreadId=42919&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>