I currently have a WinForms application with a WebBrowser control in it that I'm able to successfully edit the markup using the very useful HtmlAgilityPack. My question now is, how can I edit the stylesheet that my page is referencing?
Ideally I'd like to be able to get the complete ruleset, find the necessary IDs, and simply edit the CSS declaration like so: background-color:#ccc; <-- this is what I'm trying to modify on the fly (and have the CSS file saved and reload the page referencing said stylesheet).
It seems that there should be an easy solution to this, but I'm having trouble finding one.
EDIT: Also, I should point out that it may not always be "#ccc", the point being that I know exactly what selectors I want to modify, and in what classes they're under in the stylesheet. The exact color will be unknown after the first edit, so I can't just do a Replace on that background-color:#ccc rule.