Ondrej Janacek
Ondrej Janacek

Reputation: 12616

Get rid of the textbox validation border

How to get rid of the red border around textbox automatically used for validation purposes?

Upvotes: 7

Views: 8015

Answers (2)

Rohit Vats
Rohit Vats

Reputation: 81243

Set the ValidatesOnDataErrors and ValidatesOnExceptions to False for your binding of your textbox. In case you want your validations, then you have to ovveride the Validation Template for your control. Please refer to my answer here- How to get rid of the red border when a DataGrid cell is invalid?

Upvotes: 4

BlueM
BlueM

Reputation: 6888

Easiest way to do this:

<TextBox Validation.ErrorTemplate="{x:Null}">

Upvotes: 16

Related Questions