<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.silverlight.net/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>Programming with .NET - General</title><link>http://forums.silverlight.net/forums/17.aspx</link><description>General discussions around authoring Silverlight .NET applications.</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>Re: Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/264873.aspx</link><pubDate>Thu, 06 Aug 2009 12:57:51 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:264873</guid><dc:creator>bradhi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/264873.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=264873</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39;m working in a solution now that has several projects in it, some of them can see resources in app.xaml others can&amp;#39;t and I cant find anything different about those that cant see it. Does anyone know if this is fixed in Silverlight 3?&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;thanks,&lt;/p&gt;

&lt;p&gt;Brad&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.agcalc.com"&gt;agcalc.com&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/226830.aspx</link><pubDate>Sat, 30 May 2009 06:42:21 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:226830</guid><dc:creator>ewart</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/226830.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=226830</wfw:commentRss><description>&lt;p&gt;Did anyone ever find a solution to this?&amp;nbsp; e.g. VS2008 will not show a preview but it will run just fine in the browser?&lt;/p&gt;
&lt;p&gt;I want to be able to define several themes and swtich between them and so I moved my &amp;lt;Style&amp;gt;&amp;lt;Setter&amp;gt; xaml to a custom control and out of the .app file but I still get a problem previewing my custom control... so frustrating.&amp;nbsp; using the production version/release of silverlight 2.0&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;ewart.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.onesportevent.com/"&gt;www.onesportevent.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/98575.aspx</link><pubDate>Sun, 28 Sep 2008 04:06:08 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:98575</guid><dc:creator>royhiggs</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/98575.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=98575</wfw:commentRss><description>&lt;p&gt;First, am I the only one that thinks it is wierd that a control library can use an app.xaml file declared in an application project? The control library should be able to exist without any knowledge of the application, right? Seems like a circular dependency issue and that it shouldn&amp;#39;t be allowed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Second, I&amp;#39;m having the same issue. I put my styles in a generic.xaml file in my control library. I had to go into visual studio from Blend in order to set the file as a resourc file and remove the Custom Tool setting. I then had to close Blend and reopen it because it didn&amp;#39;t pick up the change. After that, Blend saw generic.xaml as a resource file and shows my styles in the resource tab. However, when I drop the style onto a button (for a button style) it sets the Style property correctly but gives me the error that it can&amp;#39;t find the resource. It&amp;#39;s killing me. If I drag and drop it, it should be able to find it.&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/63442.aspx</link><pubDate>Fri, 20 Jun 2008 12:04:19 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:63442</guid><dc:creator>andrevieiradematos</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/63442.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=63442</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;jasonxz:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;davidpni:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;and I don&amp;#39;t need the generic.xaml either...I can reference it directly from App.xaml&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Cool!&amp;nbsp; That&amp;#39;s good to know!&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;i have the same problem here: style defined in App.xaml gives me &amp;quot;Cannot find a Resource with that Name/Key [Line: 35 Position: 205]&amp;quot; exception when i try to run the application&lt;/p&gt;
&lt;p&gt;i&amp;#39;m using silverlight 2 beta2 and blend 2.5 june preview&lt;/p&gt;
&lt;p&gt;when i create the style, i chose &amp;quot;create in application&amp;quot;&lt;/p&gt;
&lt;p&gt;i can see the style defined in the resource panel, under App.xaml&lt;/p&gt;
&lt;p&gt;i can also use it in blend (the drag and drop thing) and it wors perfectly&lt;/p&gt;
&lt;p&gt;my problem is that VS2008 gives me errors but the application doesn&amp;#39;t work&lt;/p&gt;
&lt;p&gt;any ideas?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62660.aspx</link><pubDate>Wed, 18 Jun 2008 22:38:23 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62660</guid><dc:creator>jasonxz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62660.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62660</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/silverlight/images/icon-quote.gif"&gt; &lt;strong&gt;davidpni:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;and I don&amp;#39;t need the generic.xaml either...I can reference it directly from App.xaml&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Cool!&amp;nbsp; That&amp;#39;s good to know!&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62654.aspx</link><pubDate>Wed, 18 Jun 2008 22:14:58 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62654</guid><dc:creator>davidpni</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62654.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62654</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Okay I tried placing the control on my canvas and it does indeed run fine (with my style applied to it)....Visual Studio just likes to give me errors about it.&amp;nbsp; So it runs fine...but I can&amp;#39;t see it in the XAML preview thingy.&amp;nbsp; Oh well.&amp;nbsp; That&amp;#39;s cool.&amp;nbsp; Thanks.&amp;nbsp; (and I don&amp;#39;t need the generic.xaml either...I can reference it directly from App.xaml)&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62650.aspx</link><pubDate>Wed, 18 Jun 2008 22:07:40 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62650</guid><dc:creator>davidpni</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62650.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62650</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;It runs...I just haven&amp;#39;t tried using the control I have been making in anything yet since VS has been giving me errors :-)&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62649.aspx</link><pubDate>Wed, 18 Jun 2008 22:05:38 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62649</guid><dc:creator>jasonxz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62649.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62649</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ve noticed VS has a problem with finding Style definitions in both generic.xaml and App.xaml.&amp;nbsp; It doesn&amp;#39;t seem to be a consistent problem, though.&amp;nbsp; I&amp;#39;ve received the same error sporadically when the Style is in App.xaml (I haven&amp;#39;t tried putting a Style in generic.xaml, yet -- soon).&amp;nbsp; But, the app runs just fine, if the Style is properly defined, even though VS shows an error.&lt;/p&gt;
&lt;p&gt;So, does the app run?&amp;nbsp; &lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62646.aspx</link><pubDate>Wed, 18 Jun 2008 21:55:20 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62646</guid><dc:creator>davidpni</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62646.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62646</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Now in order to put the style definition in the library would I just create a XAML file and inside the XAML file make a ResourceDictionary?&amp;nbsp; and then save it and call it something like &amp;quot;generic.xaml&amp;quot;?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[edit]&lt;/p&gt;&lt;p&gt;Just to make things clear...I actually just tried to do that (what I asked about directly above), and it didn&amp;#39;t work.&amp;nbsp; I get the same error.&lt;/p&gt;&lt;p&gt;[/edit] &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62645.aspx</link><pubDate>Wed, 18 Jun 2008 21:47:15 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62645</guid><dc:creator>jasonxz</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62645.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62645</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m going to assume that your Application references your control library.&amp;nbsp; If that&amp;#39;s the case, you can&amp;#39;t access the App.xaml that&amp;#39;s in the Application from your library.&lt;/p&gt;
&lt;p&gt;Your 2 options, as far as I know, are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Set the Style property of your Button in the Application.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Put the Style definition in your library.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>Can't find static resource</title><link>http://forums.silverlight.net/forums/thread/62635.aspx</link><pubDate>Wed, 18 Jun 2008 20:54:52 GMT</pubDate><guid isPermaLink="false">d0d632c8-a6f7-4f68-b0ce-26aaafd62132:62635</guid><dc:creator>davidpni</dc:creator><slash:comments>0</slash:comments><comments>http://forums.silverlight.net/forums/thread/62635.aspx</comments><wfw:commentRss>http://forums.silverlight.net/forums/commentrss.aspx?SectionID=17&amp;PostID=62635</wfw:commentRss><description>&lt;p&gt;So, here is the situation: I have a solution with two projects in it.&amp;nbsp; My main project which contains App.xaml has a style meant for buttons.&amp;nbsp; It looks something like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;Style x:Key=&amp;quot;GlassButtonLeftFlat&amp;quot; TargetType=&amp;quot;Button&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter Property=&amp;quot;Template&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Setter.Value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ControlTemplate TargetType=&amp;quot;Button&amp;quot; x:Key=&amp;quot;GlassButton&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ...more xaml....&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ControlTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Setter.Value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Setter&amp;gt;&lt;br /&gt;&amp;lt;/Style&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In my other project which is a Silverlight Class Library included in my solution needs to use that style for its buttons.&amp;nbsp; So in one of my XAML files I have something like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;lt;Button Style=&amp;quot;{StaticResource GlassButtonLeftFlat}&amp;quot;&amp;gt;&amp;lt;/Button&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Unfortunately it gives me an error:&lt;/p&gt;&lt;p&gt;Error&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; Cannot find a Resource with that Name/Key [Line: 41 Position: 65]&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Does anyone know how I can properly reference that style contained in my App.xaml? &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>