2
如何添加ResourceDictionary像这样dinamicly?如何加载外部XAML ResourceDictionary
ResourceDictionary template = new ResourceDictionary();
template.Source = new Uri("Design.xaml", UriKind.Relative);
Application.Current.Resources.MergedDictionaries.Add(template);
与绝对的Uri它完美的工作,但从相对不。
您是否在您的程序集运行在同一文件夹中有Design.xaml? – Kolja 2012-02-03 12:02:20
是的,我真的有。 – Aldos 2012-02-03 12:06:16