![Eclipse intellij key map](https://cdn2.cdnme.se/5447227/9-3/12_64e61dfbddf2b3652190246e.png)
I'm fairly new to WPF and there's much to it that is still mysterious to me, so the solution may be obvious to someone with more experience with it. "formattedText.MaxTextWidth = this.ViewportWidth // space for scrollbar"
![eclipse intellij key map eclipse intellij key map](https://cache.yisu.com/upload/information/20200623/121/101069.png)
![eclipse intellij key map eclipse intellij key map](http://img.itmop.com/upload/2017-6/201763015758996090.png)
I've tracked the problem to a line in OnRender: The scrollbar is visible and it changes the size of the drag button to show that it sees that the unwrapped text is wider than the viewing area, but since the text has already been wrapped, dragging it doesn't make any difference. I've tried adding a horizontal scrollbar but that doesn't help.
![eclipse intellij key map eclipse intellij key map](https://i.pinimg.com/736x/ee/e0/8d/eee08dfb1732647e8d9b2d02fcee258c--venn-diagrams-solar-eclipse.jpg)
In a normal TextBox, simply setting the TextWrapping property to NoWrap does the trick, but not with CodeBox (which inherits from TextBox in code-behind). I've used the CodeBox project from CodeProject and it works very well except for the fact that I can't disable text wrapping.
![Eclipse intellij key map](https://cdn2.cdnme.se/5447227/9-3/12_64e61dfbddf2b3652190246e.png)