close #361
This commit is contained in:
1 parent
61ee9a5337
commit
8f1bb42714
9 files changed
+80
-26
No files matched your search
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Themes;
|
||||
|
||||
namespace HandyControl.Tools
|
||||
{
|
||||
@@ -85,5 +86,12 @@ namespace HandyControl.Tools
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static Theme GetTheme(string name, ResourceDictionary resourceDictionary)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name) || resourceDictionary == null) return null;
|
||||
return resourceDictionary.MergedDictionaries.OfType<Theme>()
|
||||
.FirstOrDefault(item => Equals(item.Name, name));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user