I have a WebBrowser control in my Windows form application to display XML files. I am using web browser control so that I get the auto-formatting that web browser provides for my XML file, along with all other benefits of a web browser.
Now the problem is, the WebBrowser by default displays the background color in white when I open the XML file. I like to change it to another color, light blue. How to do this?
I tried some approaches like
webBrowser.Document.Body.SetAttribute("bgcolor", "#738A9C");
webBrowser.DocumentText = "<html><body style='background-color:Blue'></body></html>";
But din't help. Any way to achieve this through CSS or XSLT or something?
No comments:
Post a Comment