Language binding using x:Uid in xaml overrides Text property?

  • Thread starter Thread starter ABerglund
  • Start date Start date
A

ABerglund

Guest
Hello

I am making a UWP app with language support for the first time. I found a guide of how to use the x:Uid property in xaml and bind to a resorce file with the .Text property. This works very well but I think it is a bit boring that all my text now are empty in design time since the .Text isn´t selected until I run my app. However I noticed that I can set a "Text" property as well together with the x:Uid property on my components. My Text property is then active when I am in the design mode but as soon as I run my app the Text from my x:Uid property overrides the text value so I get the selected language. This is how I want it to work, so for me it seems to work well. I just want to double check so that this is not bad design in some way or if I should use some other way for language support. What do you say?

An example of how I mean:

<TextBox Text="Hello" x:Uid="TxtHello"/>

Continue reading...
 
Back
Top