diff --git a/WinUI3XamlPreview/WinUI3XamlPreview/MainPage.xaml.cpp b/WinUI3XamlPreview/WinUI3XamlPreview/MainPage.xaml.cpp index 9675611..9b1cab3 100644 --- a/WinUI3XamlPreview/WinUI3XamlPreview/MainPage.xaml.cpp +++ b/WinUI3XamlPreview/WinUI3XamlPreview/MainPage.xaml.cpp @@ -53,8 +53,9 @@ namespace winrt::WinUI3XamlPreview::implementation auto& elements = multipleElement->elements; if (elements.empty()) { - toast().ShowError(L"Nothing to show", - L"ResourceDictionary doesn't contain any control template"); + mwamr::ResourceLoader res(mwamr::ResourceLoader::GetDefaultResourceFilePath(), L"WinUI3XamlPreview/Resources"); + toast().ShowError(res.GetString(L"XamlLoadedNothingError"), + res.GetString(L"ResourceDictionaryNoControlTemplates")); return; } UpdateCustomControlItems(std::move(elements)); diff --git a/WinUI3XamlPreview/WinUI3XamlPreview/Strings/en-US/Resources.resw b/WinUI3XamlPreview/WinUI3XamlPreview/Strings/en-US/Resources.resw index c186a71..81c7652 100644 --- a/WinUI3XamlPreview/WinUI3XamlPreview/Strings/en-US/Resources.resw +++ b/WinUI3XamlPreview/WinUI3XamlPreview/Strings/en-US/Resources.resw @@ -123,6 +123,9 @@ File Not Found + + ResourceDictionary doesn't contain any control template + Dark @@ -132,6 +135,9 @@ System Theme + + Loaded But Nothing to Show + Cannot load XAML. If you added new user/custom control, build the project first. If your app is packaged, deploy it first. diff --git a/WinUI3XamlPreview/WinUI3XamlPreview/Strings/zh-HK/Resources.resw b/WinUI3XamlPreview/WinUI3XamlPreview/Strings/zh-HK/Resources.resw index 23f050c..9b5e3d4 100644 --- a/WinUI3XamlPreview/WinUI3XamlPreview/Strings/zh-HK/Resources.resw +++ b/WinUI3XamlPreview/WinUI3XamlPreview/Strings/zh-HK/Resources.resw @@ -123,6 +123,9 @@ 找不到檔案 + + ResourceDictionary 沒有任何 control template + 深色 @@ -132,6 +135,9 @@ 系統主題 + + 已讀取但沒有東西可顯示 + 無法讀取 XAML。如果你新增了 User/Custom Control,請先構建專案。如果你的應用是已包裝的,請先安裝。