[英]cannot load xaml in resourcedictionary
我正在嘗試在ResourceDictionary中加載xaml文件,我所做的是創建像這樣的Dictionary:
ResourceDictionary dict = new ResourceDictionary();
接着:
dict.Source = new Uri(""pack://application:,,,/jusapp;component/Resources/Languages/it.xaml", UriKind.Relative);
現在,我具有以下應用程序文件夾結構:
AppName
Resources
Languages
en.xaml
it.xaml
不幸的是我得到這個錯誤:
找不到資源
但是資源存在,為什么會這樣?
如果要使用附屬程序集構建本地化的應用程序,請確保在AssemblyInfo.cs中具有以下注釋
[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.