locked
Need to Update Resource File Dynamically RRS feed

  • Question

  • Hi , i need to update resource file value for any control like textBlock or lable , From Other Source like Services or database at runtime , suppose String1 value is USERNAME in resource file i want to update This USERNAME as "USER" at run time in my Windows8 metro application C# with XAML . any idea About this problem .  because you also had faced the same situation so i guess you might be having some idea about it . i will be thanxful to you .
    Wednesday, August 28, 2013 1:08 PM

Answers

  • DOnt think you can do it with resource files. But you can bind your TextBlock Text property to other values.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, August 28, 2013 2:36 PM
  • The resource files are specially packaged by visual studio and can only be read via the resource loader getstring method so you can't write to them. Any string values you want that are changeable will have to be stored in local storage or in text or xml file.
    Wednesday, August 28, 2013 7:36 PM

All replies

  • DOnt think you can do it with resource files. But you can bind your TextBlock Text property to other values.

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, August 28, 2013 2:36 PM
  • The resource files are specially packaged by visual studio and can only be read via the resource loader getstring method so you can't write to them. Any string values you want that are changeable will have to be stored in local storage or in text or xml file.
    Wednesday, August 28, 2013 7:36 PM