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>
<开发者_StackOverflow社区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.
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.
精彩评论