I am creating a Windows 8 app that needs to contain two main types of data - List<Project>
and List<User>
, where Project
and User
are data models containing different types of data (including List
s of other objects etc).
I have previously been making Windows Phone apps, and there I simply used the application settings to store data in similar scenarios. So I hoped that would work in Windows 8 as well.
I have elected to use the ApplicationData.Current.LocalSettings
-structure to save my app data. However, whenever I try to save my data, I get this type of error:
WinRT information: Error trying to serialize the value to be written to the application data store Additional information: Data of this type is not supported.
The models are marked with [DataContract]
attributes if that makes any difference.
As far as I have understood Microsoft, only standard data types (like booleans, strings etc) can be saved in this fashion. Is this correct?
And if so, how could I save data structured in this way?
Help would be greatly appreciated!