In a WPF application, I want to build a "Find in Files" output pane, in which I can stream large quantity of text, without re-allocating memory at each line, like the TextBox would do.
The WPF TextBox has a single Text property which stores a contiguous string. Each time, I want to add content, I need to do textBox.Text += "New Text", which is bad.
Ideally, that control would be virtual and require a minimum of resources, just for the visible lines.
I thought about using a standard ListBox with a VirtualizingStackPanel, but it does not allow Text Selection across lines.
(At each new line added, I want the control to update)
Any suggestion?