就拿在WP7屏幕截图的网页浏览器 [英] Take screenshot Webbrowser in wp7

查看:169
本文介绍了就拿在WP7屏幕截图的网页浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个code采取截图在WP7。

I have a code to take screenshot in wp7.

int Width = (int)LayoutRoot.RenderSize.Width;
int Height = (int)LayoutRoot.RenderSize.Height;

// Write the map control to a WwriteableBitmap
WriteableBitmap screenshot = new WriteableBitmap(LayoutRoot, new TranslateTransform());

using (MemoryStream ms = new MemoryStream())
{
    // Save it to a memory stream
    screenshot.SaveJpeg(ms, Width, Height, 0, 100);

    // Take saved memory stream and put it back into an BitmapImage
    BitmapImage img = new BitmapImage();
    img.SetSource(ms);

    // Assign to our image control
    ImageFromMap.Width = img.PixelWidth;
    ImageFromMap.Height = img.PixelHeight;
    ImageFromMap.Source = img;

    // Cleanup
    ms.Close();
}

在我的屏幕上有一个网页浏览器来显示互联网内容。当preSS按钮即可拍摄。我可以把屏幕上的照片,但网页浏览器区域显示一个白色矩形。

In my screen have a webbrowser to display content in internet. when press button Take. i can take a photo of screen but webbrowser area display a white rectangle.

推荐答案

目前,没有任何方法来实现在web浏览器的截图。但是,如果你只是想截图不存储库或瓷砖的使用运行时显示,你可以落实摆上截图查看您的WebBrowser控件的功能。 web浏览器的缩略图可以在WPF的方式实施

Currently, there is no way to implement a screenshot over WebBrowser. But if you just want a runtime display of screenshot not store to gallery or for tile usage, you can just implement the function by put your WebBrowser control on the screenshot view. Thumbnail of WebBrowser can be implement in WPF way

这篇关于就拿在WP7屏幕截图的网页浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆