Stream stream = WriteableBitmap.PixelBuffer.AsStream() missing

筅森魡賤 提交于 2019-12-10 19:18:09

问题


I'm writing windows store app (8.1) and I have sample (probably for win 8.0):

private WriteableBitmap WriteableBitmap;
…
WriteableBitmap = new WriteableBitmap(500,500);
…
using (Stream stream = WriteableBitmap.PixelBuffer.AsStream())
{
    …
}

So I have created new win 8.1 project and trying to do it same way, but when I get to:

using (Stream stream = WriteableBitmap.PixelBuffer.AsStream())

My project dont recognize *.AsStream() method, can anyone tell me why?


回答1:


using System.Runtime.InteropServices.WindowsRuntime;


来源:https://stackoverflow.com/questions/20478467/stream-stream-writeablebitmap-pixelbuffer-asstream-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!