yashasvi Kumar

yashasvi Kumar

  • 1.7k
  • 41
  • 1.1k

RichtextBox formated text

Jan 15 2015 11:37 PM
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)