Questions tagged [mergeddictionaries]

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.

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…
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
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:
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…
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…
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:
Alex B
  • 644
  • 1
  • 9
  • 22
6
votes
1 answer

MergedDictionaries in XAML rewritten to code

Is this XAML code in App.xaml:
kajovajo
  • 211
  • 3
  • 12
5
votes
1 answer

Merged dictionaries in the App.xaml

I have a bunch of Xaml vector icons inside a separated .xaml. I load them inside my window using this directive:
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
4
votes
2 answers

Problem reference converter from an external assembly

I am creating a Resource Dictionary, where I reference all my converters, so there is no need to reference each individual converter. My converters are in the different assembly, to import them I do the following: Add reference to external…
Vitalij
  • 4,587
  • 9
  • 42
  • 65
4
votes
4 answers

Silverlight Shared MergedDictionaries

I am using Silverlight 4 and trying to share some common styles (colors, brushes). My take was to put them into a "Common.xaml" Resource Dictionary and then use it in all other Resource Dictionaries. Referencing everything like so:
Wolfgang
  • 41
  • 1
  • 2
4
votes
1 answer

ResourceDictionary in MergedDictionaries Source causing VS 2012 Designer not to load

the line ResourceDictionary Source="..." ist underlined and the VS designer throws an Exception. Everything was working in VS 2008
1
2 3 4 5