WPF TextBox getting cut off
00:23 01 Jun 2013

For some strange reason my WPF textbox which is embedded in a scroll viewer get abruptly cut off like in the image below after I have added a lot of text to it. Is there some limit or something that is reached that I can make larger or something?

enter image description here

I do not receive any error messages.

Here is the relevant Xaml:


        

Here is the C# I use to add the text:

main.DispatchInvoke(() =>
            {
                main.OutBox.Text += newText;
                main.Scroller.ScrollToVerticalOffset(main.Scroller.ScrollableHeight);
                main.Scroller.UpdateLayout();
            });
c# wpf textbox windows-phone-8 windows-phone