If you, and I assume that you are initiating a ShowDialog () call with a button click, Silverlight has some strange heuristics to determine if an action has been triggered.
It works with debugging, but if you execute the code from Button_Click to ShowDialog (), it seems that due to the delay this is not an action initiated by the user.
To get around this, I would recommend using logging instead of moving on to debugging the application. Silverlight is known for throwing these exceptions when trying to debug ShowDialog () calls.
* EDIT
Silverlight does not use the Click () event to determine if the button was triggered by the user. It uses many heuristics to determine correctly, including a timer (which causes debugging to fail)
source share