Search code examples
wpfmvvmtextboxcaret

Textbox doesn't follow text, when typing more than fits inside


I've encountered a weird bug, where textboxes wont follow when typing more than fits inside. Looks like this:

textbox bug

For reference, this is what a normal TextBox looks like in a blank project: textbox normal

I've tried a few things, in order to fix it, like commenting out all textbox-related styles, put it in a blank view, but to no avail. Another interesting bit is that textboxes inside xceed datagrids look just fine.

I wish I had more info, but there's seemingly no reason, why they don't work, so any ideas would be greatly appreciated!


Solution

  • It was a ScrollViewer style, that was overriding the internal scrollviewer inside the textbox.