External Resource Dictionaries
- Hy all
My problem is as follows:
I built a resource dictionary with a lot of styleTemplates. This templates I compiled into a Class Library. I am used to work with Blend for its perfect support in this matter.
What I want to to is to reference to an external dll (with all my style definitions) in the App.xaml by mergedDictionaries with the pack command. So far so good. Everything works fine, but now, when I am going to use the cool feature of blend (apply Resource) there are no styles to choose. When I look in the Resource Tab, there is my linked resource, but with doubleClick the exception "Unabel to find the specified file" occur.
The curious thing is, when I hard code in XAML for example the Button Template={DynamicResource MyButtonTemplate} the Button appears in my defined style in the external DLL... :S
Is blend not able to work in design time to apply resources by right Mousclick to (Edit Control Parts -> Apply Resource...) ?
Thanks a lot for any answers...
Greets dave
Réponses
- Hi Dave,
For Blend 3, you will be only able to consume resources that come out of dictionaries that are merged into your project from an external library.
For better design time support, you should consider the following technique (which you can use to replace your App.xaml with a differenter version, that points to the actual resource dictionary):
http://blogs.msdn.com/expression/archive/2008/04/09/creating-a-wpf-blend-project-that-loads-resources-in-code.aspx
Thanks,
Unni
This posting is provided "AS IS" with no warranties, and confers no rights.- Marqué comme réponseDavid Rupp mardi 1 septembre 2009 17:53
Toutes les réponses
- Hi Dave,
For Blend 3, you will be only able to consume resources that come out of dictionaries that are merged into your project from an external library.
For better design time support, you should consider the following technique (which you can use to replace your App.xaml with a differenter version, that points to the actual resource dictionary):
http://blogs.msdn.com/expression/archive/2008/04/09/creating-a-wpf-blend-project-that-loads-resources-in-code.aspx
Thanks,
Unni
This posting is provided "AS IS" with no warranties, and confers no rights.- Marqué comme réponseDavid Rupp mardi 1 septembre 2009 17:53

