Windows phone screenshot 截图 代码
看了Alexis的文章,http://www.cnblogs.com/alexis/archive/2011/06/01/2067220.html,
关于windows phone屏幕截图的,
试了一下,屏幕翻转在landscape的状态下,截图貌似有问题,
于是google了一下,
发现如下代码:(http://blog.markarteaga.com/ScreenCaptureOnWindowsPhone7.aspx)
private void btnCaptureScreen_Click(object sender, RoutedEventArgs e)
{
//Capture the screen and set it to the internal picture box
WriteableBitmap bmp = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
bmp.Render(this, null);
bmp.Invalidate();
//this.image1.Source = bmp;
//Set a new background
//ImageBrush brush = new ImageBrush();
//brush.ImageSource = new BitmapImage(new Uri(NextImage,UriKind.Relative));
//ContentGrid.Background = brush;
}
经尝试,可成功截图。