得到了這行代碼here,但它不起作用。Silverlight 4.0:如何在隔離文件存儲中增加配額
private void Button_Click(object sender, RoutedEventArgs e)
{
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())
{
long newSpace = isf.Quota + 1523456786435;
try
{
if (true == isf.IncreaseQuotaTo(newSpace))
{
Debug.WriteLine("success");
}
else
{
Debug.WriteLine("unsuccessful");
}
}
catch (Exception ex)
{
throw ex;
}
}
}
我已經有一個按鈕,我將上面的代碼放在click事件中。 – xscape 2010-03-15 03:33:04
這只是一個完全愚蠢的限制。我寫了一個緩存機制,我現在可能不得不放棄。 他們爲什麼選擇將其限制爲用戶事件,你實際上並沒有從中獲益。 – Oliver 2010-06-29 08:47:04
我同意,如果您必須使用您無法觸及的對話框詢問用戶許可,那麼此限制有什麼意義? – andrecarlucci 2010-10-11 21:05:35