C# 如何在Windows.Storage本地文件夹中保存、访问和删除可写位图?

C# 如何在Windows.Storage本地文件夹中保存、访问和删除可写位图?,c#,bitmap,windows-runtime,C#,Bitmap,Windows Runtime,来自windows 7后台,我对独立存储非常熟悉,但它不支持winRT项目。因此,在winRT组件中使用时,在isostore中保存位图不会在活动磁贴上显示图像。如何将这个新的可写位图保存到本地文件夹,然后在winRT组件中访问它。并在其工作完成后删除该图像。 多谢各位 var bitmap2 = new WriteableBitmap(691, 336); //Set the background Rectangle r2 = new Rectan

来自windows 7后台,我对独立存储非常熟悉,但它不支持winRT项目。因此,在winRT组件中使用时,在isostore中保存位图不会在活动磁贴上显示图像。如何将这个新的可写位图保存到本地文件夹,然后在winRT组件中访问它。并在其工作完成后删除该图像。 多谢各位

      var bitmap2 = new WriteableBitmap(691, 336);

        //Set the background
        Rectangle r2 = new Rectangle();
        r2.Height = 336;
        r2.Width = 691;
        r2.Fill = new SolidColorBrush(currentAccentColorHex);
        bitmap2.Render(r2, null);

        bitmap2.Render(ww, null);
        bitmap2.Invalidate();

        widefilename = "/Shared/ShellContent/large.jpg";

        var isf = IsolatedStorageFile.GetUserStoreForApplication();

        //save the medium image
        using (var stream = isf.OpenFile(mediumfilename, System.IO.FileMode.OpenOrCreate))
        {
            bitmap1.SaveJpeg(stream, 336, 366, 0, 100);

        } // Replacing Isolated Storage with Local Folder Storage
在Windows运行时中,使用而不是IsolatedStorageFile。获取本地文件夹的使用(并考虑使用ROAMIMPFILE)。< /P> 有关选项和示例代码的概述,请参见MSDN上的