I have a System.Windows.Form.WebBrowser control in a form. I am moving this browser object to a URL.
Once the page has finished loading, I would like to analyze the various aspects of the loaded page.
In particular, I am interested to see the attribute 'writingMode', which is located on the IHTMLStyle3 interface.
Sort of:
public void MyMethod(HtmlElement element)
{
IHTMLElement2 element2 = element.DomElement as IHTMLElement2;
IHTMLStyle3 style3 = element2.currentStyle as IHTMLStyle3;
string writingMode = style3.writingMode;
...
The problem is that the value of style3 is null. I assume this means that IHTMLElement2.currentStyle does not support IHTMLStyle3.
I tried and tried casting IHTMLELement.style. But while it does happily, like IHTMLStyle3, it does not seem to contain the style that was applied to the Html element.