My exposure to the System.Windows.Forms.RichTextBox has been very minimal, which is to say I have never had a need for it.

An application I am currently designing requires that I create and display a document to the user. I think the RichTextBox might be the best control to use since I will be extracting data from a DataRow and building the document on the fly.

I understand that like a TextBox, a RTB has a Text property and an AppendText method. What I don't understand, is how I format the text that I want to add to the RTB. For instance, if I start with a blank RTB, how do I add a Title that is centered? Remember that I am using the RTB to display data as a document (Kind of like MS Word). I read the documentation on MSDN but the only examples I could find simply loaded an existing text file into the RTB.

Any guidance is appreciated.