1

Hi Im trying write an App which features a small WebBrowsers element. What I want to do is only display a part of a specific webpage.

Is there a way to crop(a lack for a better term) what is shown to the user?

Ps. I've tried to mess around with WebBrowser.Clip(i dont know even know if its the right method for this), but so far no success. Any help would be much appreciated.

4

1 回答 1

1

如果我对您的理解正确,那么您正在这样做:

您的应用程序中有一个 WebView。您使用链接导航到某个页面?喜欢万维网。* *

如果是,那么你应该这样:

向您的链接发出请求,以获取特定页面的 HTML:

string pageHTML = HttpClient.GetResponse() // something like that.

现在你有了 HTML 页面,你可以随意修改它,实现 JS 脚本等......

pageHTML = pageHTMLmodified;

接下来你这样做:

WebBrowser.NavigateToString(pageHTML);

如果我正确理解你的问题

于 2013-11-08T08:56:26.507 回答