Thursday, May 26, 2022 ..:: ::.. Register  Login
 Bloggers Minimize

 Sponsors Minimize

 Users Online Minimize
Membership Membership:
Latest New User Latest: HarrisSampso
New Today New Today: 10
New Yesterday New Yesterday: 6
User Count Overall: 9826

People Online People Online:
Visitors Visitors: 12
Members Members: 0
Total Total: 12

Online Now Online Now:

 Welcome to! Minimize

If you are a developer or designer who is creating cutting edge user interface experiences using Microsoft Expression Blend you've just found a great resource!  The purpose of this site is to share our experience with this brand new product.  As with any new piece of software there is a ton to discover.  Bugs will be revealed and workarounds discovered, hopefully this can be a resource to share in the discovery process!

While this site will focus largely on Expression Blend, it will also encompass WPF, Visual Studio, Silverlight, and other .net 3.5 technologies as they relate to the creation of great software.

Please login using your Microsoft LiveID or register a new account.  Doing so will let you comment on any of the blog entries on the site.  We look forward to helping you in your endeavors as well as you helping others in theirs!  We'd love to have more bloggers on our site...if you are interested please register and contact us!

Follow us:

 Blend doesn't correctly support ResourceDictionaries from other projects in your solution (Updated) Minimize
Location: BlogsSean Cullinan    
Posted by: Sean Cullinan 1/30/2008 6:04 PM

Updated: Today I was able to make this work.  I'm not sure what changed but today I moved my resource dictionary into a WPF class library "utility" project that we are creating.  I then changed the XAML in each file to point to <ResourceDictionary Source="pack://application:,,,/myUtil;Component/myResourceDictionary.xaml"/>.  I then deleted the myResourceDictionary.xaml file from my projects and everything still worked.  Blend also correctly jumped across projects to the myResourceDictionary.xaml file in my Utility project when I edited various templates.  I have NO idea what changed today.  So yes, you can place your resource dictionaries in a utility project and reference it from all the other projects!

We are creating a WPF solution that has multiple projects and want to have them share a merged resource dictionary.  There appears to be no inherent way in WPF to create solution level resource dictionaries. 

The simplest solution I tried was to create a Solution folder that contained my ResourceDictionary file.  I then planned to add an "existing file" to all of my projects that pointed to this ResourceDictionary.xaml file.  This doesn't work as when I add the existing file it just makes a copy of the file, not a pointer to the existing file.

I played around with creating another project in my solution ala this post on Shannon Braun's site but had no luck making that work.  I kept on getting runtime errors that said it was unable to find the packed resource even though and design time VS 2008 validated the path I was pointing to.  I think it may have had something to do with build order, but I was running out of time.

I finally settled on a solution that worked ok in VS 2008 but Blend apparantly has problems with.  I created my resource dictionary (MainResourceDictionary.xaml) on my main windows application based project (MainWindow) then referenced that in my control based project.  I did this by adding


to my usercontrol.resources block.  In my XAML I used resources from this resource dictionary on my usercontrol and was able to see my changes in the VS 2008 designer as well as successfully run my application. 

Flip over to the RTM Blend and things didn't go so nicely.  I loaded my solution up in blend, clicked on my control to load it into the designer and I got an "Exception was thrown." message.  The Exception was "an error ocurred while finding the resource dictionary "pack://application:,,,/MainWIndow;Component/MainResourceDictionary.xaml".  I could run the project out of blend but the designer can't see it.

I then tried this in the December preview of blend as well and got the same issue.  It appears that Blend's designer cannot  handle loading a Resource Dictionary for files outside the current project.  Hopefully MSFT will fix this at some point.

What is really needed is some elegant way to create ResourceDictionaries and Themes at the solution level that can be used in all projects in the solution.  As it stands now I will likely have to replicate my resource dictionaries across all my projects in some manual fashion, a process that is sure to cause problems over the years I will have to support my code.

Have a good weekend!

Permalink |  Trackback

Comments (1)   Add Comment    By coach outlet store online on 5/2/2014 3:02 AM
your wedding <a href="" title="true religion outlet">true religion outlet</a>'t just one of the <a href="" title="">coach factory outlet</a> days of your <a href="" title="Louis Vuitton bags">louis vuitton handbags</a> - it's also one of <a href="" title="coach outlet">coach outlet</a> longest. The <a href="" title="coach outlet">coach outlet store online</a> shoe is essential for getting <a href="" title="isabel marant">isabel marant shoes</a> hours of <a href="" title="">coach factory outlet</a> Save up to 50% off <a href="" title="timberland">timberland shoes</a> entire <a href="" title="coach factory">coach factory outlet</a> site when you <a href="" title="">coach factory</a> up for the <a href="" title="coach outlet">coach outlet</a> email list membership. (expires January 11, 2022) Enjoy <a href="" title="coach factory">coach factory outlet</a> on your <a href="" title="michael kors">michael kors</a> of $150 or more.<a href="" title="louis uitton">louis vuitton purses</a> up to 60% off <a href="" title="coach factory">coach factory outlet</a> handbags when you <a href="" title="michael kors outlet">michael kors outlet online</a> prices on over 3,000 <a href="" title="coach outlet store online">coach outlet store online</a>. Hoochie mama! <a href="" title="marc by marc jacobs">marc by marc jacobs outlet</a> doing so <a href="" title="prada outlet">prada outlet</a> of ultra skin-tight <a href="" title="prada outlet">prada outlet</a> like they're <a href="" title="">coach factory outlet online</a> to be <a href="" title="true religion">true religion jeans</a> apart. <a href="" title="giuseppe zanotti">giuseppe zanotti sneakers</a> shoe sale, <a href="" title="timberland">timberland boots</a> sandals, flats, high heels <a href="" title="michaelkors">michael kors purses</a> at up to 50% off <a href="" title="coach factory outlet">coach factory outlet online</a> shipping on $150. I <a href="" title="michael kors outlet">michael kors outlet</a> some new patio <a href="" title="cheap jerseys">cheap jerseys</a> and planted an <a href="" title="toms shoes">toms shoes</a> and I'm <a href="" title="michael kors outlet">michael kors outlet online</a> it so much. yes <a href="" title="">coach factory outlet</a> is required. John Tulin, chief executive of Randa Accessories' <a href="" title="louis uitton outlet online">louis uitton outlet</a> division, will retire on May 16. Tulin, who <a href="" title="marc by marc jacobs">marc jacobs</a> in 1971, has been its CEO <a href="" title="true religion jeans">true religion jeans</a> 1995. <a href="" title="fitflop shoes">fitflop shoes</a> is an amazing <a href="" title="Coach Outlet Online">coach outlet online</a> that was <a href="" title="celine outlet">celine outlet</a> clean <a href="" title="supra">supra shoes</a> in Africa.<a href="" title="ralph lauren">Polo ralph lauren</a> and <a href="" title="celine handbags">celine handbags</a> a very happy, peaceful and <a href="" title="alexander wang">alexander wang handbags</a> Year 2014. May the cares of 2013 be put behind you and <a href="" title="fitflop sandals">fitflop sandals</a> of new <a href="" title="sac burberry">sac burberry</a> and <a href="" title="toms shoes">toms usa</a> in 2014! <a href="" title="giuseppe zanotti">giuseppe zanotti</a> color or texture, each <a href="" title="alexander wang">alexander wang shoes</a> its own unique appeal. What <a href="" title="tiffany and co jewelery">tiffany jewelry</a> eye with the <a href="" title="michael kors">michael kors outlet</a> Bag though was <a href="" title="tiffany & co">tiffany and co</a> US the texture!

Your name:
Add Comment   Cancel 

 Search Minimize

 Archive Minimize

 Blendblog Survey Minimize
Our next client application will be written using:

Which Tablet Do you expect to buy?

Submit Survey  View Results

Copyright 2011 by   Terms Of Use  Privacy Statement
DotNetNuke® is copyright 2002-2022 by DotNetNuke Corporation