DrGriff DrGriff - 1 year ago 179
C# Question

WPF dialog blocking input after closing

I have a WPF window in a VSIX application that I show as follows:

var myWindow = new MyWindow(this.CurrentWorkspace)
Owner = Application.Current.MainWindow
myWindow .ShowDialog();

However, after I've closed this window, I then get the following error message:

Microsoft Visual Studio has detected that an operation is blocking
user input. This can be caused by an active modal dialog or a task
that needs to block user interaction.

What am I missing?

Note, this may not need to be a dialog window, but I had a problem when it wasn't.

Answer Source

Found that the DialogWindow solved the problem mentioned, but it wasn't a complete solution. Refer to: WPF modal window in Visual Studio Extension blocking input.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download