C# set css to a System.windows.forms.webBrowser
Is it possible to set css to the webbrowser? If yes, than how Can I do 开发者_开发知识库this?
Let's say I have a class with 2 properties:
public String Css
and public XElement Body
I want to bind the body to a webbrowser and set the css of that webbrowser.
Is this possible and how should I do this?
You can assemble a string containing the complete HTML with a <style>
tag, then set the DocumentText
property to that string.
精彩评论