开发者

How can I get all the visual attributes of a text in a HtmlElement inside a WebBrowser?

开发者 https://www.devze.com 2023-01-04 07:28 出处:网络
I just need exactly those visual attributes (font, size, color, etc.) that the WebBrowser itself use to render the text. They have to be somewher开发者_如何转开发e otherwise the WebBrowser wouldn\'t k

I just need exactly those visual attributes (font, size, color, etc.) that the WebBrowser itself use to render the text. They have to be somewher开发者_如何转开发e otherwise the WebBrowser wouldn't know how to show the text.


Take a look at HtmlElement.Style - it's a list of CSS styles. You can get HtmlElements from the HtmlDocument (e.g. document.Links gives you all the links). Also, you should only get the HtmlDocument once the browser.DocumentCompleted event fires.

0

精彩评论

暂无评论...
验证码 换一张
取 消