I recommend you use WebBrowser or RichTextBox control instead of TextBox control to display colorful content such as XML document, as take WebBrowser control for example, you can set its EditMode on, something like this
Code Block
void Form5_Load(object sender, EventArgs e)
{
this.webBrowser1.Navigate(@"c:\test\a.xml");
this.webBrowser1.Document.ExecCommand("EditMode", true, null);
}
I recommend you use WebBrowser or RichTextBox control instead of TextBox control to display colorful content such as XML document, as take WebBrowser control for example, you can set its EditMode on, something like this
Code Block
void Form5_Load(object sender, EventArgs e)
{
this.webBrowser1.Navigate(@"c:\test\a.xml");
this.webBrowser1.Document.ExecCommand("EditMode", true, null);
}
You can use google to search for other answers
|