Is there anyway to reduce IsolatedStorage capacity in Silverlight?
- by Edward Tanguay
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?