• <small id='Oj8Qa'></small><noframes id='Oj8Qa'>

    <i id='Oj8Qa'><tr id='Oj8Qa'><dt id='Oj8Qa'><q id='Oj8Qa'><span id='Oj8Qa'><b id='Oj8Qa'><form id='Oj8Qa'><ins id='Oj8Qa'></ins><ul id='Oj8Qa'></ul><sub id='Oj8Qa'></sub></form><legend id='Oj8Qa'></legend><bdo id='Oj8Qa'><pre id='Oj8Qa'><center id='Oj8Qa'></center></pre></bdo></b><th id='Oj8Qa'></th></span></q></dt></tr></i><div id='Oj8Qa'><tfoot id='Oj8Qa'></tfoot><dl id='Oj8Qa'><fieldset id='Oj8Qa'></fieldset></dl></div>
          <bdo id='Oj8Qa'></bdo><ul id='Oj8Qa'></ul>
        <tfoot id='Oj8Qa'></tfoot>

        <legend id='Oj8Qa'><style id='Oj8Qa'><dir id='Oj8Qa'><q id='Oj8Qa'></q></dir></style></legend>
      1. C#WPF)如何在showdialog()显示子模式窗口后最小化父窗口?

        时间:2023-10-06
      2. <small id='5dLT1'></small><noframes id='5dLT1'>

        <tfoot id='5dLT1'></tfoot>
          <legend id='5dLT1'><style id='5dLT1'><dir id='5dLT1'><q id='5dLT1'></q></dir></style></legend>

            <i id='5dLT1'><tr id='5dLT1'><dt id='5dLT1'><q id='5dLT1'><span id='5dLT1'><b id='5dLT1'><form id='5dLT1'><ins id='5dLT1'></ins><ul id='5dLT1'></ul><sub id='5dLT1'></sub></form><legend id='5dLT1'></legend><bdo id='5dLT1'><pre id='5dLT1'><center id='5dLT1'></center></pre></bdo></b><th id='5dLT1'></th></span></q></dt></tr></i><div id='5dLT1'><tfoot id='5dLT1'></tfoot><dl id='5dLT1'><fieldset id='5dLT1'></fieldset></dl></div>
                <tbody id='5dLT1'></tbody>

                  <bdo id='5dLT1'></bdo><ul id='5dLT1'></ul>
                  本文介绍了C#WPF)如何在showdialog()显示子模式窗口后最小化父窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 stackoverflow 上搜索了一些帖子,一些讨论得出结论,因为这是 WPF 模态窗口的标准行为,所以无法做到这一点.

                  I've searched some posts on stackoverflow and some discussion concluded as there's no way to do this as it's standard behavior of WPF modal Window.

                  真的没有解决方案可以从模态子窗口最小化(控制)父窗口吗?

                  Isn't there really a solution to minimize(control) the parent Window from a modal child Window?

                  任何黑客或知道往返的人?

                  Anybody who hacked or knows a roundtrip ?

                  您的出色想法将永远受到高度赞赏.

                  Your excellent ideas will be highly appreciated always.

                  谢谢!

                  推荐答案

                  您可以通过应用程序窗口集合获取您的窗口的引用.这是最小化 MainWindow 的示例,在我的示例中是父窗口:

                  You can get the reference of your Window via application window collection. This is an example of minimizing the MainWindow which is in my example the parent window:

                      private void button_Click(object sender, RoutedEventArgs e)
                      {
                          foreach (Window win in Application.Current.Windows.OfType<MainWindow>())
                          {
                              var mainWin = ((MainWindow)win);
                              mainWin.WindowState = mainWin.WindowState == WindowState.Minimized ? WindowState.Normal : WindowState.Minimized;
                          }
                      }
                  

                  您可以将窗口状态设置为最小化.

                  You can just set the window state to minimized.

                  如果你想摆脱窗口,只需使用 .Hide(); 并再次显示 .Show();.

                  If you want to get rid of the window just use .Hide(); and to show it agian .Show();.

                  这篇关于C#WPF)如何在showdialog()显示子模式窗口后最小化父窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:jQuery UI 的对话框在 ASP.NET 上不起作用 下一篇:.Owner 属性和 ShowDialog(IWin32Window 所有者)之间的区别?

                  相关文章

                    • <bdo id='UM9Aw'></bdo><ul id='UM9Aw'></ul>

                    <small id='UM9Aw'></small><noframes id='UM9Aw'>

                    <tfoot id='UM9Aw'></tfoot>

                      <i id='UM9Aw'><tr id='UM9Aw'><dt id='UM9Aw'><q id='UM9Aw'><span id='UM9Aw'><b id='UM9Aw'><form id='UM9Aw'><ins id='UM9Aw'></ins><ul id='UM9Aw'></ul><sub id='UM9Aw'></sub></form><legend id='UM9Aw'></legend><bdo id='UM9Aw'><pre id='UM9Aw'><center id='UM9Aw'></center></pre></bdo></b><th id='UM9Aw'></th></span></q></dt></tr></i><div id='UM9Aw'><tfoot id='UM9Aw'></tfoot><dl id='UM9Aw'><fieldset id='UM9Aw'></fieldset></dl></div>
                      <legend id='UM9Aw'><style id='UM9Aw'><dir id='UM9Aw'><q id='UM9Aw'></q></dir></style></legend>