Answer the question
In order to leave comments, you need to log in
How to improve TextBox performance and scroll down on refresh?
In general, I decided to rewrite the old project under WPF with MVVM and ran into such a problem
... enough text.
I would like to make sure that the entire text is not redrawn, but only a new one is added. Well, after the update, scroll down. At the same time, it is imperative to preserve the MVVM approach.
Answer the question
In order to leave comments, you need to log in
Event TextChanged -> (sender as TextBox).ScrollToEnd();
The text will still be replaced.
Only the visible part is drawn. But, if there is a ScrollBar, the control needs to know the height of the entire text, and when the text is inserted, the height of the entire text is recalculated. Especially if TextWrapping is installed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question