This project is read-only.

Saving to isolated storage

Nov 10, 2011 at 12:41 PM
Edited Nov 10, 2011 at 5:45 PM

 

EDIT: The problem was that i reach the quota of 1MB!   I hate it that Silverlight does not give me an error or something...

 

 

      
     This code does not work properly. It saves only a piece of the picture. The resulting picture is the upper 2/3 part of the picture. The code that follows is not executed so I get an error or exception or something.

 

 

 using (var store = IsolatedStorageFile.GetUserStoreForApplication())
            {
                
              using (Stream stream = store.OpenFile(@"data.jpg", FileMode.Create))
                {

                  App.GlobalVariables.itImg.WriteToStream(stream);
  
                }

            }