Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Splitting Generic.Xaml - problem loading MergedDictionaries

working on a pretty large library of controls the generic.xaml gets simpy out of control. I want to split it pretty much by control (although once for a namespace which contains only some simple ones for now).

For that, i am adding more Resource Dictionaries.

Then, in the generic.Xaml I add:

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Themes/Generic.Core.xaml" />
</ResourceDictionary.MergedDictionaries>

And... get a loading error.

What is the correct URL?

This is:

  • Within a dll file containing only controls (not an exe or something).
  • The generic.Xaml and the other one (for now: Generic.Core.xaml) live in the same assembly, same folder.

I read the MSDN part about the pack URL's but that sounds really complicated for something that looks SO easy.

;) Please help.

like image 525
TomTom Avatar asked Jul 21 '10 06:07

TomTom


1 Answers

Found it:

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/Tradex.Presentation;component/Themes/Generic.Core.xaml" />
</ResourceDictionary.MergedDictionaries>

That works.
Needs to prefix the assembly (replace Tradex.Presentation with assembly name) and start with the component item.

like image 95
TomTom Avatar answered Oct 20 '22 04:10

TomTom