WPF ShowDialog returns immediately
- by dthrasher
Sometimes when I call ShowDialog on an OpenFileDialog Window in WPF, the dialog closes immediately with a return value of false.
I'm calling ShowDialog in response to a button click event. I can reproduce this problem using the sample code for OpenFileDialog on MSDN:
// Configure open file dialog box
Microsoft.Win32.OpenFileDialog dlg = new…