Preview of dynamicresources in WPF

160 Views Asked by At

I´ve a WPF app, and I´m implementing globalization. I´m changing static content to DynamicResource. I´m following this article. All is working perfect, except I cannot preview the content in XAML Visual Editor (in VST). Yes, i know that it´s dynamic content, but is it possible to preview at least one default language? The problem is I cannot preview the labels, and it´s hard to guess how it fits all.

Thanks,

1

There are 1 best solutions below

0
On

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".