Dialogs From Outside the UI

If you are getting the "Dialogs must be user-initiated." error in Visual Studio, you are probably calling an OpenFileDialog or SaveFileDialog from the wrong place. The most common 'wrong place' seems to actually be the debugger. If are stepping through your code and try to step over a…