我希望我的窗口在启动时完全隐藏。无窗口,任务栏中无条目。用户看不到,应用程序已启动。
我怎么能知道呢?
谢谢!
最佳答案
HB方法的另一种选择是将Visibility
设置为隐藏并将ShowInTaskbar
设置为false。这仍然会创建窗口并让其执行操作。
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" ShowInTaskbar="False" Visibility="Hidden">
<Grid>
</Grid>
</Window>
关于.net - 启动时完全隐藏WPF窗口吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6690848/