How to Get the string from AppResources file in Windows Phone 8 ?

If you want to retrieve the value from the AppResources file in Windows Phone 8 , you can use one of the below options.

How to Get the string from AppResources file in Windows Phone 8 ?

image

1. Using the AppResources.<Property>

Assume that the string in the AppResources file is ApplicationTitle and the which contains the value “Abundantcode for Windows Phone development” . , you can use the below code snippet to get the value.

string ApplicationTitle = AppResources.ApplicationTitle;
            
MessageBox.Show(ApplicationTitle);

2. You can also use the AppResources.ResourceManager class to retreive the string using the GetString method as shown below.

string ApplicationTitle = AppResources.ResourceManager.GetString("ApplicationTitle");
            
MessageBox.Show(ApplicationTitle);