Remove "X" button at the end of a TextBox

Otacilio Oliveira picture Otacilio Oliveira · Feb 26, 2013 · Viewed 19.1k times · Source

enter image description here

I'm developing a Windows Store App using C# + XAML. When I add a TextBox with the property TextWrapping set to NoWrap, a "X" appears at the end of the TextBox when it's focused.

So, I need to remove this "X" and the TextBox can not Wrap.

Answer

Bartho Bernsmann picture Bartho Bernsmann · Feb 27, 2013

As everyone stated, you really shouldn't remove the "X" unless if you have a really good reason to do that.

To remove the X, instead of setting TextWrapping to "NoWrap", you have to set it to TextWrapping="Wrap"