afa*_*lek 4 c# wpf uri resourcedictionary
URI 前缀无法识别
我在System.NotSupportedException.
此行用于设置 a 的来源ResourceDictionary:
view.Source = new Uri("/DA.EasyTeach.Math;component/View.xaml", UriKind.RelativeOrAbsolute);
Run Code Online (Sandbox Code Playgroud)
View.xaml具有生成操作的资源。
我有一个混合应用程序 WinForms + WPF,原因是System.Windows.Application.Current == null. 基于这个问题,我通过在创建字典 Uri 之前运行以下行来解决它:
new System.Windows.Application();
Run Code Online (Sandbox Code Playgroud)