我有一个 WPF 应用程序,我正在实施全球化。我正在将静态内容更改为 DynamicResource。我正在关注这篇文章。一切都很完美,除了我无法在 XAML 可视化编辑器(在 VST 中)中预览内容。是的,我知道它是动态内容,但是否可以预览至少一种默认语言?问题是我无法预览标签,而且很难猜出它是如何适合所有人的。
谢谢,
我有一个 WPF 应用程序,我正在实施全球化。我正在将静态内容更改为 DynamicResource。我正在关注这篇文章。一切都很完美,除了我无法在 XAML 可视化编辑器(在 VST 中)中预览内容。是的,我知道它是动态内容,但是否可以预览至少一种默认语言?问题是我无法预览标签,而且很难猜出它是如何适合所有人的。
谢谢,
Ok, I´ve found it. You have to add the resource in the xaml editor:
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources\StringResources.es-ES.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
With this, you can preview the WPF app with a dictionary and also avoid all the warnings of "DynamicResource Cannot be resolved".