如何从MergedDictionaries中选择资源

时间:2009-07-03 07:57:46

标签: wpf resources

首先,我在MergedDictionaries中读取xml中的所有资源 现在我喜欢“选择”任何资源作为Current.Resources

伪代码:

Application.Current.Resources = Resources.From.MergedDictionaries.Selected(themeId.Path);

任何想法?

1 个答案:

答案 0 :(得分:2)

您可以使用Application.FindResource,它还会搜索MergedDictionaries