GetThemeResourceDictionary referencing wrong assembly
Hoakie opened this issue · 1 comments
Hoakie commented
Think it should look like this, with DotNetProjects in the assembly name
public static ResourceDictionary GetThemeResourceDictionary(string theme)
{
if (theme != null)
{
Assembly assembly = Assembly.LoadFrom("DotNetProjects.WPF.Themes.dll");
string packUri = String.Format(@"/DotNetProjects.WPF.Themes;component/{0}/Theme.xaml", theme);
return Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;
}
return null;
}
Original code:
public static ResourceDictionary GetThemeResourceDictionary(string theme)
{
if (theme != null)
{
Assembly assembly = Assembly.LoadFrom("WPF.Themes.dll");
string packUri = String.Format(@"/WPF.Themes;component/{0}/Theme.xaml", theme);
return Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;
}
return null;
}
jogibear9988 commented
Fixed