Merged Resource Dictionaries are used to define the resources portion of WPF applications, outside the compiled XAML app. Do not use this tag for questions related to merging dictionaries, for which, you can use the [dictionary] tag instead.
Questions tagged [mergeddictionaries]
71 questions
24
votes
4 answers
MergedDictionaries and Resource lookup
i have a problem with Resource dictionaries and mergeddictionaries in general, especially when it comes to resource-lookup performance. After some performance testing i found that ResourceDictionary.get_MergedDictionaries is the call with the most…

dowhilefor
- 10,971
- 3
- 28
- 45
20
votes
1 answer
WPF: Style based on another one in a separate assembly
Assembly A - ResourceDictionary contains StyleA style.
Assembly B - ResourceDictionary.MergedDictionaries to merge resources from Assembly A into B.
I would like to create a style in Assembly B "based on" StyleA. Is it possible?
I am trying to…

Gus Cavalcanti
- 10,527
- 23
- 71
- 104
19
votes
1 answer
Merged dictionaries and local resources
I have a Styles.xaml that groups many ResourceDictionarys inside a MergedDictionary.
I imported Styles.xaml in my UserControl.Resources

Sergio
- 2,078
- 3
- 24
- 41
15
votes
3 answers
Referencing a resource in a ResourceDictionary from a different ResourceDictionary in Silverlight
I have the following set of code in my App.xaml:
…

Mike S.
- 402
- 1
- 3
- 13
14
votes
2 answers
How to reference WPF style keys defined in a separate assembly in another library
I have two libraries and a single application assembly project layout and I'm wondering how can I reference styles by their key in one of my libraries that's defined in the other.
My solution layout:
WpfControls.dll - Holds generic reusable…

jpierson
- 16,435
- 14
- 105
- 149
9
votes
3 answers
Using MergedDictionaries in generic.xaml in Silverlight 3
In WPF it was possible to organise the XAML for multiple user controls by keeping the markup in separate XAML files in the themes folder and then using MergedDictionaries to import them into generic.xaml:
…

Gordon Mackie JoanMiro
- 3,499
- 3
- 34
- 42
8
votes
1 answer
Type reference cannot find type named '{clr-namespace:xxx}ClassName on MergedDictionary
I'm received the exception Type reference cannot find type named '{clr-namespace:Dashboard.View}DashBoardColors at runtime.
I have a static class with my colors:
namespace Dashboard.View
{
public static class DashBoardColors
{
public…

MattC
- 3,984
- 1
- 33
- 49
7
votes
2 answers
Proper usage of Merged Resource Dictionaries in Silverlight 3
As I read: http://msdn.microsoft.com/en-us/library/cc903952(VS.95).aspx, specifically the section labeled "Forward References With a ResourceDictionary":
Static resource references from within
any given resource dictionary must
reference a…

RobDemo
- 291
- 5
- 13
6
votes
3 answers
XAML - Using fonts from resource dictionary from another assembly
I am building an application that uses ResourceDictionaries from another assembilies and I'm having problems with using fonts.
There is an assembly named MyFontAssembly that stores fonts along with references to them as an ResourceDictionary. The…

Kacper Stachowski
- 947
- 9
- 29
6
votes
1 answer
Using BasedOn property with a Style defined in a different dictionary
The application I'm working on has 2 ResourceDictionary, DefaultStyles.xaml and CustomStyles.xaml.
Is it possible that a style in the CustomStyles dictionary uses a base style defined in the other dictionary?
DefaultStyles.xaml: