Why doesn't my resource dictionary work when referenced from an AddIn?

Viewed 21

I have an assembly called StyleLibrary that contains StyleDictionary.xaml. It's referenced by another assembly's App.xaml using

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/StyleLibrary;component/StyleDictionary.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

This project is an AddIn for another program. If I run the WPF .exe directly that uses the resource dictionary I can load the windows fine with the correct styles. If I try to run the classes in that exe that open the windows from another assembly it doesn't recognize the styles and I get an exception.

What am I doing wrong?

0 Answers
Related