7

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.

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
TomTom
  • 61,059
  • 10
  • 88
  • 148

1 Answers1

18

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.

devpelux
  • 2,492
  • 3
  • 18
  • 38
TomTom
  • 61,059
  • 10
  • 88
  • 148