Including More than One ResourceDictionary in Your Xaml

I have one giant Xaml ResourceDictionary that's becoming unwieldy to manage. The solution is simple. Use MergedDictionaries.

Snippet:

<Window.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="FileResources1.xaml" />
            <ResourceDictionary Source="FileResources2.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Window.Resources>

If you made it this far, you should follow me on Twitter.

-JP

comments powered by Disqus