Friday, August 10, 2012

WPF: Referring to a resource dictionary in another assembly

For a client I created a re-usable set of resource dictionary files. So I embedded them in a separate assembly that can be referenced in other WPF projects. But I always forget the correct syntax to refer to these resource files.

So just as a reminder to myself:

<ResourceDictionary Source="pack://application:,,,/YourSharedAssembly;component/Subfolder/YourSharedResourceFile.xaml"/>

No comments: