【发布时间】:2014-12-23 10:23:23
【问题描述】:
我遇到了一些问题。我希望我的应用在 app.xaml.cs 中动态加载 ResourceDictonnary。
这是我目前的代码:
ResourceDictionary theme = XamlReader.Load(???);
Resources.MergedDictionaries.Add(theme);
问题是,如何从 xaml 文件中获取 ResourceDictionnary 流?我不想用 exe 复制 xaml 文件。它的构建操作设置为 Page,我想加载它。
你能告诉我怎么做吗?
谢谢!
【问题讨论】:
标签: c# wpf xaml resourcedictionary xamlreader