Как обновить пользовательский интерфейс приложения WPF после смены языка ⇐ C#
Как обновить пользовательский интерфейс приложения WPF после смены языка
I'm working on localizing my WPF application and I have created resource files for Japanese and English languages. In my XAML markup, I've set the 'Text' property of labels, text blocks and various other controls using the syntax 'Text="{x:Static resx:StringResources.ID_WELCOME_STRING}"' to reference strings from resource files.
Now, I'm implementing language selection selection functionality via a ComboBox, and I want to REFRESH the UI of the application dynamically when the user selects a different language option.
I've tried using the 'InvalidateVisual' method, but it doesn't seem to work as expected.
It's worth mentoning that I prefer not to use ResourceDictionary for localization due to the use of satellite assemblies in .resx files.
Can anyone provide guidance or suggest an effective UI refresh after changing the language. Thank you!
Источник: https://stackoverflow.com/questions/781 ... g-language
I'm working on localizing my WPF application and I have created resource files for Japanese and English languages. In my XAML markup, I've set the 'Text' property of labels, text blocks and various other controls using the syntax 'Text="{x:Static resx:StringResources.ID_WELCOME_STRING}"' to reference strings from resource files.
Now, I'm implementing language selection selection functionality via a ComboBox, and I want to REFRESH the UI of the application dynamically when the user selects a different language option.
I've tried using the 'InvalidateVisual' method, but it doesn't seem to work as expected.
It's worth mentoning that I prefer not to use ResourceDictionary for localization due to the use of satellite assemblies in .resx files.
Can anyone provide guidance or suggest an effective UI refresh after changing the language. Thank you!
Источник: https://stackoverflow.com/questions/781 ... g-language
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Android ActivityInjector: получить исключение жизненного цикла после смены языка
Anonymous » » в форуме Android - 0 Ответы
- 29 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как обновить активность после изменения языка (локали) внутри приложения
Anonymous » » в форуме Android - 0 Ответы
- 32 Просмотры
-
Последнее сообщение Anonymous
-