Windows Phone 8 应用内截图
WriteableBitmap wb = new WriteableBitmap(this.LayoutRoot, new MatrixTransform()); //wb.Render(this.LayoutRoot, new MatrixTransform()); wb.Invalidate(); using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream()) { //Extensions.LoadJpeg(); //Extensions.SaveJpeg(wb, memoryStream, wb.PixelWidth, wb.PixelHeight, 0, 100); //wb.LoadJpeg(System.IO.Stream); wb.SaveJpeg(memoryStream, wb.PixelWidth, wb.PixelHeight, 0, 100); memoryStream.Seek(0, System.IO.SeekOrigin.Begin); new Microsoft.Xna.Framework.Media.MediaLibrary().SavePicture("hello.jpg", memoryStream); }
全屏幕截图快捷键是 开机键+home键