Verticall scroll richtextbox below [WPF]

I have a richtextbox, and when it is full, I want it to scroll automatically to the bottom, maybe? Do it with xaml?

+2
wpf richtextbox scrollbar
Nov 23 '10 at 12:41
source share
3 answers

Using ScrollViewer.ScrollChanged routed event and writing some code (for example, richTextBox1.ScrollToEnd() ), you can do what you want.

+4
Nov 23 '10 at 12:47
source share

RichTextBox has a ScrollToEnd method that could be called in Codebehind. I do not know how to do this only in XAML.

+1
Nov 23 '10 at 12:47
source share

Assuming your RichTextBox is named Output , attach this method to the TextChanged event:

 void Output_TextChanged(object sender, TextChangedEventArgs e) { Output.ScrollToEnd(); } 
0
May 14 '15 at 1:05 a.m.
source share



All Articles