Load a ResourceDictionary from an assembly

You actually need to write the Uri like this:

Assembly.LoadFrom(@"C:\temp\test.dll");
ResourceDictionary rd = new ResourceDictionary();
rd.Source = new Uri(@"pack://application:,,,/test;component/myresource.xaml");

Leave a Comment