Converter of reference signals from an external assembly

I am creating a resource dictionary where I refer to all my converters, so there is no need to reference each individual converter. My converters are in different assemblies, to import them I do the following:

  • Add External Assembly Link
  • Create Resource Dictionary
  • Add XML space referencing assembly transformers
  • Reference Converters

So my dictionary is as follows:

<ResourceDictionary xmlns:Converters="clr-namespace:Client.Utilities.Converters;assembly=Client.Utilities"> <Converters:BoolToBrushConverter x:Key="boolToBrush"/> </ResourceDictionary> 

However, when I create the assembly, I get the following exception:

 Error 18 The tag 'BoolToBrushConverter' does not exist in XML namespace 'clr-namespace:Client.Utilities.Converters;assembly=.Client.Utilities'. Line 12 Position 6. C:\Resources.Tests\Resources\ResourceDictionaries\Converters\ConvertersResources.xaml 12 6 Client.eZenith.Resources.Tests 

Any ideas why this is happening?

Note. . From intellisense, it seems that the namespace for the Converters assembly is correct, since all the converters appear in the list of sentences after entering <Converter:

Change VS and blend designers can find this converter when previewing controls.

Edit: I found out that this is not related to combining dictionaries. The same problem occurs when adding a converter to Windows resources.

+4
source share
2 answers

I found the problem in the end, it is combined with the resourcedictionary bug problem introduced in .NET 4.

I fixed it by adding an empty style to the unified resource dictionary (I previously had an RD where I changed to another RD and nothing more).

here is this blog post I recently found that describes the same issue.

+1
source

Try using

 <ResourceDictionary xmlns:Converters="clr-namespace:Client.Utilities.Converters;assembly=Client.Utilities"> 

instead of this.
Edit: clr-namespace instead of namespace .

0
source

All Articles