I know how to set string from resource
<TextBlock x:Uid="Text1"/>
where Text1.Text is “Hello”
But I want to do like this
<TextBlock Text = {something here to get GreetingText}/>
where GreetingText is “Hello”
So that I may get the same string from code also as
var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
var string = loader.GetString("GreetingText");
Nikhil’s answer is on the right track, but is right for other platforms.
For windows 8, you need to do the following in your resource directory:
In your xaml:
In code: