public static void Read()
        {
            FileStream = PreferenceFile.OpenFile(FileName, System.IO.FileMode.Open);
            XmlSerializer serializer = new XmlSerializer(typeof(DataPreferences));

            CurrentPreferneces = (DataPreferences)serializer.Deserialize(FileStream);
            FileStream.Close();
        }
        static InternalStorageProvider()
        {
            FileName           = "Sobolev.Capstone.Prefernces.xml";
            CurrentPreferneces = new DataPreferences();


            PreferenceFile = IsolatedStorageFile.GetStore(
                IsolatedStorageScope.Assembly | IsolatedStorageScope.User,
                null, null);

            if (!PreferenceFile.FileExists(FileName))
            {
                WriteDefault(); // save default data for the next launching of the app
            }
            else
            {
                Read();
            }
        }
 public static void Update(DataPreferences newPref)
 {
     CurrentPreferneces = newPref;
     WriteDefault();
 }