forum

Home / DeveloperSection / Forums / Adding text to RichTextBox #C / WPF

Adding text to RichTextBox #C / WPF

Anonymous User 3922 17-Dec-2013

What I am trying to achieve is to add text after every operation to a RichTextBox. The problem is that these operations take some time and instead of viewing the appended text after every operation finishes, I view them all at the end of the routine.

Semi-Pseudo code:

RichTextBox richTextBox = new RichTextBox()
if (Operation1())
{
   richTextBox.AppendText("Operation1 finished");
   if (Operation2())
   {
      richTextBox.AppendText("Operation2 finished");
      if (Operation3())
      {
         richTextBox.AppendText("Operation3 finished");
      }
   }
}

The problem is that I view the appended text of operation 1 & 2 after the operation 3 is finished.

I read somewhere that I need to use something called BackgroundWorker???

wpf wpf 
Updated on 17-Dec-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By