am developing an app for Windows Phone 8.0 in C#
I need to save a class which contains a List of Images : List<Image> as a property by using IsolatedStorageSettings
First time , the app crashed at saving code line with System.Runtime.Serialization.InvalidDataContractException
I followed the instruction for Serializing an object but still i still get the same exception
Code:
Lists Class
[DataContract]
public class Lists
{
[DataMember]
public List<Image> ImageTiles = new List<Image>();
}
Saving :
ImageTiles.Add(CroppedImage);
lists = (Lists)levels["Lists"];
lists.ImageTiles = ImageTiles;
levels["Lists"] = lists;
levels.Save();
What is still missing ?