在我的应用程序中,可以创建当前 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/