views:

21

answers:

1

I am using the ValidatesOnExceptions=true method of WPF validation. This involves throwing an exception in the source's property setter method. It works but the debugger always breaks when the exception is thrown. I am guessing that this is because the exception is not caught directly in my user code but it is caught in the WPF validation code. Is there anyway to stop the behavior, or is it just the price you pay when you use this method of validation?

+1  A: 

Hi,

In Visual Studio go to Debug - Exceptions... and uncheck User-unhandled

I think Tools - Options... - Debugging - General - "Enable just my Code" must be checked for this option to be visible

If you want to disable breaking on a specific exception, say System.Exception, then Expand System and uncheck System.Exception

Meleak