Is there anyway to reduce IsolatedStorage capacity in Silverlight?

Posted by Edward Tanguay on Stack Overflow See other posts from Stack Overflow or by Edward Tanguay
Published on 2010-04-14T17:10:02Z Indexed on 2010/04/14 17:13 UTC
Read the original article Hit count: 346

Filed under:
|
|

With this code I can have Silverlight ask the user if he wants to increase IsolatedStorage:

private void Button_IncreaseIsolatedStorage_Click(object sender, RoutedEventArgs e)
{
    IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();
    long newStorageCapacityInBytes = FileHelpers.GetMaxiumumSpace() + SystemHelpers.GetAmountOfStorageToIncreaseWhenNeededInBytes();
    store.IncreaseQuotaTo(newStorageCapacityInBytes);
    Message = "IsolatedStorage increased. " + FileHelpers.GetSpaceLeftMessage();
}

But if I try to set it to an amount less than it current is, I get an error that this is not possible.

1. Is there a workaround for this, i.e. can I reduce the amount of IsolatedStorage?

2. When the user agrees to increasing IsolatedStorage, can other applications use this capacity or just the application in which he increased it?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about isolatedstorage