5
Reply

RichtextBox formated text

Ask a question
Hi All,


I am stuck in an issue,I have to show XML content in Richtextbox and do formatting as per element name , My problem is this that when i use RichtextBox selected property and font property than i lose all containing data of Richtextbox and, than how to format only that specific line or part of text .


foreach (XElement detail in doc.Descendants("title"))// put section ID
                 {

                     richTextBox1.SelectedText = detail.Value;
                     richTextBox1.SelectionFont = new Font("arial", 18);

                     detail.Value =  Environment.NewLine + detail.Value + Environment.NewLine ;
              

                   }  

Answers (5)