从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,