I have around 3 languages resources(.RESX) file and I would like to use them in XAML as I use in CS file with no problem.
My cs code is like this: Properties.Resources.ResourceManager.GetString("Key")
And It's working but I need to use the same dictionary file to XAML file as well.
I made some searchs but didn't find a way to solve my problem.
The language change is trigged by another program, so I cannot set manually it.
1条答案
按热度按时间mrphzbgm1#
可以将XAML中的资源与
x:Uid
一起使用然后,您可以拥有资源
TextBlock.Text
,它将设置任何具有x:Uid“TextBlock”的控件的Text属性