To use the built-in virtualization (i.e. VirtualizingStackPanel, the default ListBox), you must be able to place content in items that can be loaded sequentially as needed (logical scrolling). For this, arbitrary large text will require a lot of preprocessing to calculate line breaks and break text into lines or groups of lines. After that, you will need to use the container obtained from ItemsControl, instead of one TextBox. Do you have a requirement to have editable text?
John bowen
source share