从WinRT中的WebView检索内容 [英] Retrieve contents from WebView in WinRT

查看:84
本文介绍了从WinRT中的WebView检索内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XAML中有一个Web视图控件。我已经获得了该网络视图的来源。在完成网络视图的加载后,我需要从该网络视图中检索内容。这有可能吗?我需要在
C#中使用。

I have one web view control in XAML. I have given source to that web-view. Once the loading of web-view completed I need to retrieve the contents from that web view. Is there any possibilities for that? I need to do that using in C#.

提前致谢...!

谢谢&此致,Sathish N软件工程师,iLink Systems

Thanks & Regards, Sathish N Software Engineer, iLink Systems

推荐答案

Hey Sathi_NAGA,

Hey Sathi_NAGA,

您无法从webview中加载的内容中获取代码。 

You cannot obtain the code from the content loaded in webview. 

您只能做的事情是,您可以通过以下网址获取在webview中加载的内容的屏幕截图WebViewBrush类。

Only thing you can do is, you can get a screenshot of the content loaded in webview through the WebViewBrush class.

这可以通过此代码实现,

This can be achieved through this code,

private void MyButton_Click_1(object sender, RoutedEventArgs e)
 {
 WebViewBrush MyWebViewBrush = new WebViewBrush();
 MyWebViewBrush.SourceName = "MyWebview";
 MyWebViewBrush.Redraw();
 MyRectangle.Fill = MyWebViewBrush;
 MyWebview.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
 }

有关从Webview捕获屏幕截图的详细信息,请参阅在这里,

Fore more details about capturing the screen shot from Webview, see here,

您需要了解的有关WebView的十件事


这篇关于从WinRT中的WebView检索内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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