wpf 中英文版编写

1 var uriC = new Uri("/YTManage.Language;component/Chinese.xaml", UriKind.Relative);   // 得到资源的相对路径。
//YTManage.Language项目名称 ,
//Chinese.xaml 资源名称 ,其它的都是一样
2 //var uriE = new Uri("/YTManage.Language;component/English.xaml", UriKind.Relative); 3 //var resE = (ResourceDictionary)Application.LoadComponent(uriE); 4 var resC = (ResourceDictionary)Application.LoadComponent(uriC); 5 //Application.Current.Resources.MergedDictionaries.Add(resE); 6 Application.Current.Resources.MergedDictionaries.Add(resC);
原文地址:https://www.cnblogs.com/qq247039968/p/4069151.html