windows-phone-7 - 使用应用栏 WP8 创建屏幕截图

标签 windows-phone-7 windows-phone-8 windows-phone screenshot writeablebitmap

在我的应用程序中,可以创建当前 View 的屏幕截图。我用 WriteableBitmap 类实现它。例如:

var frame = Application.Current.RootVisual as PhoneApplicationFrame;                WriteableBitmap bitmap = new WriteableBitmap(frame, null);
BitmapImage result = new BitmapImage();
using (var stream = new MemoryStream())
{
    bitmap.SaveJpeg(stream, (int)frame.ActualWidth, (int)frame.ActualHeight, 0, 100);
    result.SetSource(stream);
}

问题是,如果现在正在显示的页面上有一个应用程序栏,它不会显示在保存的图像上。有什么想法我应该如何处理这个问题?

最佳答案

Application 栏不是您应用程序的一部分,因此您不能这样做。唯一的方法是要求用户通过按 Windows+相机按钮进行屏幕截图。

关于windows-phone-7 - 使用应用栏 WP8 创建屏幕截图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16082167/

相关文章:

c# - 如何简单的访问网盘,读写文件?

c# - c#中图像的边框

c# - UnhandledException 在 Windows Phone 上的所有情况下都能正常工作吗?

c# - 使用嵌套异步调用锁定

c# - 如何在 Windows Phone 8 上创建此哈希

c# - 如何访问 Windows Phone 7 中的联系人列表?

windows-phone-7 - 按返回键退出应用程序

c# - 从我发送的 post 请求中读取我的 json 响应

c# - UploadStringAsync() 的返回值。?

c# - 发布到 Web API 时出现不支持的媒体类型错误