DrGriff DrGriff - 7 months ago 64
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.


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.