9

The RichTextBox component in my WPF app is populated using a FlowDocument and the RichTextBox's Document property.

rtb.ScrollToEnd(); doesn't seem to do anything, and i've even tried calling BringIntoView() on the last "row" added to the table that structures my FlowDocument.

Any Suggestions? Thanks!

Mike
  • 5,560
  • 12
  • 41
  • 52
Kyle
  • 355
  • 1
  • 4
  • 13
  • I cannot reproduce this. It just works. Do you have any more detail you can provide that could explain why yours is not working? Perhaps you could provide some code to describe how you are creating and placing the FlowDocument into the RichTextBox? – Jerry Bullard Sep 12 '09 at 03:26
  • 1
    Yeah more details are required. I do want to give you this though: If you're going to use it as a log output for example, adding lots and lots of elements it's gonna eat memory. Many people (including myself) have dealt with this before. – TimothyP Sep 12 '09 at 15:44

1 Answers1

21

I spent forever trying to figure out what I did wrong. Make sure you have <RichTextBox ScrollViewer.VerticalScrollBarVisibility="Auto"> set or simply nothing will happen and you'll wonder why.

Mike
  • 5,560
  • 12
  • 41
  • 52