Wpf Tool Window Style Application not visible in alt+tab

ⅰ亾dé卋堺 提交于 2019-12-23 16:51:48

问题


I have a WPF application with

  1. Main Window which is not a tool window
  2. Launch a child window which has WindowStyle="ToolWindow" ShowInTaskbar="False" from main window

Now BOTH Main Window and Child Window are not visible in Alt+Tab. [Child window not appearing in alt+tab is expected behavior,but Main window should be visible]

Any help would be appreciated. Related link:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/95e076a3-3030-4dc0-ab23-a7e489b2a160


回答1:


It works as expected on my machine (Windows 7) when using Show:

Window child = new Window();
child.Owner = this;

child.WindowStyle = WindowStyle.ToolWindow;

child.ShowInTaskbar = false;
child.Show();

When using ShowDialog, the issue occurs. However, I am wondering whether it makes sense to show a ToolWindow as Dialog - Tool Windows are usually no dialogs.



来源:https://stackoverflow.com/questions/2146230/wpf-tool-window-style-application-not-visible-in-alttab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!