WPF modal window in Visual Studio Extension blocking input

前端 未结 1 929
臣服心动
臣服心动 2021-01-25 04:28

Using the following tutorial, within a VSIX project, I created a WPF window that inherits from Microsoft.VisualStudio.PlatformUI.DialogWindow, and I display this modally using t

相关标签:
1条回答
  • 2021-01-25 04:54

    The following suggestion found here seems to work for me:

    IVsUIShell uiShell = (IVsUIShell)ServiceProvider.GetService(typeof(SVsUIShell));
    
    uiShell.EnableModeless(0);
    
    var myWindow = new MyWindow(myParameters)
    {
        Owner = Application.Curent.MainWindow
    }
    myWindow.ShowDialog();
    
    uiShell.EnableModeless(1);
    
    0 讨论(0)
提交回复
热议问题