Linking in Design-Time to WPF shortcuts, buttons, etc.?

We are developing a WPF and MVVM application that requires multilingual support. On each control with static text, we use a converter to find the right word for the custom language.

However, this means that each control does not display text. This causes some annoyance to interface developers during development. Is there a way to display development time text?

For instance:

        <TextBlock>
          <TextBlock.Text>
              <Binding Converter="{StaticResource Translator}"
                       Path="Controller"
                       ConverterParameter="Search for" />
          </TextBlock.Text>
        </TextBlock>

How can I get this converter to execute at design time to display the translated converter parameter?

+3
source share
1 answer

, . :

<TextBlock Text="{my:Localize Key=MyLabel, Default='The text you want to be displayed by default'}" .../>

Blend.

-, , . , , .

+1

Source: https://habr.com/ru/post/1788200/


All Articles