In the Visual Studio output window, you can put your text at the end of the output so that the text field scrolls automatically when new text is written. And when the carriage does not end, it will not scroll down. I would like to emulate this using the WPF text box.
I was able to do this, but only if the TextBox is not read-only. This is because I need a caret and no one is displayed when you have a read-only text field.
The problem is that the text field is editable (with copy / cut / paste and enter commands), but I don't want to.
Is there a clean solution? I would prefer not to lock all the keys, since I have CommandBindings that should work when the TextBox is focused.
thanks
wpf readonly textbox
Thibaut tollemer
source share