Skip to content
This repository has been archived by the owner on May 6, 2019. It is now read-only.

how to add css rules ? #40

Open
gomidas opened this issue Jun 13, 2015 · 0 comments
Open

how to add css rules ? #40

gomidas opened this issue Jun 13, 2015 · 0 comments

Comments

@gomidas
Copy link

gomidas commented Jun 13, 2015

How can we create css rules for webKit browser ?

I was doing it like this on default browser...

IHTMLDocument2 currentDocument = (IHTMLDocument2)webBrowser1.Document.DomDocument;

                int length = currentDocument.styleSheets.length;
                IHTMLStyleSheet styleSheet = currentDocument.createStyleSheet(@"", length + 1);
                TextReader reader = new StreamReader(Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "cssFile.css"));
                string style = reader.ReadToEnd();
                styleSheet.cssText = style;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant