Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF RichTextBox - ScrollToEnd() method does not cause any scrolling to occur

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!

like image 919
Kyle Avatar asked Sep 11 '09 15:09

Kyle


1 Answers

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.

like image 59
Mike Avatar answered Oct 10 '22 13:10

Mike