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

Published on July 23, 2014 by abundantcode

Filed under Windows Phone

Last modified July 23, 2014

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3405 times

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);

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...