从不同的应用程序增加Windows Phone上的独立存储大小

时间:2014-01-21 10:28:57

标签: c# windows-phone-8

有没有办法从其他应用程序或通过手机设置增加Windows Phone 8应用程序的独立存储大小?

2 个答案:

答案 0 :(得分:2)

这个问题引出了另一个问题,为什么你想要做到这一点?特别是你遇到的问题是什么让你想增加隔离存储?...你的问题可以通过this SO post about how to stream directly to isolated storage?

中提供的答案解决吗?

即使用以下函数:

IncreaseIsolatedStorageSpace(e.Result.Length)

看看at this Windows 7 Phone solution

protected bool IncreaseIsolatedStorageSpace(long quotaSizeDemand)
{
    bool CanSizeIncrease = false;
    IsolatedStorageFile isolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication();
    //Get the Available space
    long maxAvailableSpace = isolatedStorageFile.AvailableFreeSpace;

    if (quotaSizeDemand > maxAvailableSpace)
    {
        if (!isolatedStorageFile.IncreaseQuotaTo(isolatedStorageFile.Quota + quotaSizeDemand))
        {
            CanSizeIncrease = false;
            return CanSizeIncrease;
        }

        CanSizeIncrease = true;
        return CanSizeIncrease;
    }

    return CanSizeIncrease;
}

编辑:如果不这样做,请查看Windows Phone Power Tools,它比基本SDK好得多

答案 1 :(得分:2)

应用程序在Windows Phone上进行沙盒化 无法从不同的应用程序增加隔离存储大小。