I want to pass a bunch of text to display the status / progress of a long-running task (for example, an output window in Visual Studio).
I currently have something like this XAML:
<ScrollViewer Canvas.Left="12" Canvas.Top="12" Height="129" Name="scrollViewer1" Width="678">
<TextBlock Name="text" TextWrapping="Wrap"></TextBlock>
</ScrollViewer>
and this code is behind:
private void Update(string content)
{
text.Text += content + "\n";
scrollViewer1.ScrollToBottom();
}
After a while, he becomes very slow.
Is there a recommended way to do such things? Am I using the right kind of control?
Thank!
source
share