wpf 中英文版编写

时间:2023-03-09 08:24:54
wpf 中英文版编写

wpf 中英文版编写

 var uriC = new Uri("/YTManage.Language;component/Chinese.xaml", UriKind.Relative);   // 得到资源的相对路径。
//YTManage.Language项目名称 ,
//Chinese.xaml 资源名称 ,其它的都是一样
 //var uriE = new Uri("/YTManage.Language;component/English.xaml", UriKind.Relative);  //var resE = (ResourceDictionary)Application.LoadComponent(uriE);  var resC = (ResourceDictionary)Application.LoadComponent(uriC);  //Application.Current.Resources.MergedDictionaries.Add(resE);  Application.Current.Resources.MergedDictionaries.Add(resC);