Spectraljump
Spectraljump

Reputation: 4617

(C#) Silverlight TextBox Scroll to Bottom

I want to get a Textbox to autoscroll to bottom whenever it gets updated with text, but it seems that there is no such method in Silverlight. In Windows Forms, I would do it this way:

textbox_txt.SelectionStart = textbox_txt.Text.Length;
textbox_txt.ScrollToCaret();

In Windows Presentation Foundation, I would do it this way:

textbox_txt.SelectionStart = textbox_txt.Text.Length;
textbox_txt.ScrollToEnd();

Now how the heck do I do this in Silverlight? there is no such scroll method anywhere.

Upvotes: 1

Views: 1821

Answers (1)

AlexEzh
AlexEzh

Reputation: 621

ActualHeight contains the total height of the text. You can wrap text into the scroll view as described here

Upvotes: 1

Related Questions