Domanda

When I bind a TextBlock.Text to LocalizedResources.ApplicationTitle, at design time it displays 'MY APPLICATION'. I searched through the code and couldn't find where this string literal is defined, or generally, how do I define design time value for localized strings?

È stato utile?

Soluzione

Localized string resources is saved in AppResources.resx. And it is used in design time as well as in run time.

You can edit the .resx file in VS to add localized string values :

enter image description here

Practical reason for separating the resources in .resx file is, you can add string resources for other locale by simply adding another .resx file with corresponding culture info code suffix.

Further reference : How to build a localized app for Windows Phone 8

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top