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?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top