我正在尝试在我的 Windows 移动应用程序运行时捕获屏幕。到目前为止我有这个,但我一直收到 The parameter is incorrect
的 ArgumentException。我做错了什么?
WriteableBitmap wb = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
wb.Render(this, null);
wb.Invalidate();
MemoryStream ms = new MemoryStream();
int h = 212;
int w = 444;
wb.SaveJpeg(ms, w, h, 0, 100); // The parameter is incorrect
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(ms);
image1.Source = bitmapImage;
以上内容在我的 MainPage 构造函数中。
更新
我设法使用了 Matt 推荐的很棒的教程。
但是,它似乎没有从 WebBrowser
捕获任何内容。
1) 有谁知道 native 电子邮件应用程序如何呈现 HTML 电子邮件 - 它使用什么组件?
2) Windows Phone 7 系列的原生应用是用什么创建的?
最佳答案
这是 Jeff Wilcox 刚刚发布的另一个解决方案
它会按您指定的时间间隔捕获屏幕截图,然后将它们保存到 IsolatedStorage。
关于c# - Windows Phone 7 - 捕获屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7742591/