【发布时间】:2011-10-12 15:31:48
【问题描述】:
我正在尝试在我的 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) 有谁知道本机电子邮件应用程序如何呈现 HTML 电子邮件 - 它使用什么组件?
2) Windows Phone 7 系列使用什么来创建原生应用程序?
【问题讨论】:
标签: c# windows-phone-7