locked
Save data in binded json file?

    Question

  • Hello everyone,I am fresh and I am making a game which read data in json file, just like the sample:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn439314.aspx

    And now some information about the game need to be saved, so I wonder if I can save the information in the json file(as a property of object).I try to bind data in "TwoWay Mode" and use the way of changing controls to save information,and it seems not work.Is that way available or some problem with my code? I'll apreciate that if you provided some cases for reference?

    Thank you very much!

    Sunday, April 13, 2014 2:46 AM

Answers

  • You would have to bind to properties in a class.  I would assume you json file would be a string property.  I guess you could use an IValueConverter to get the value you are looking for in the json file.   I think it would just be easier to convert the json to a class and bind to the properties in the class
    Sunday, April 13, 2014 12:22 PM