Multiple windows, but also multiple items on the task bar

前端 未结 2 1307
春和景丽
春和景丽 2020-12-10 13:02

I\'m setting up a program that has three different windows. I\'m just using ..

Window1 win1 = new Window1(); win1.show();

...for each of the extra windows.

相关标签:
2条回答
  • 2020-12-10 13:39

    Set the ShowInTaskbar to false

    <Window ShowInTaskbar="False" ... />
    

    If you want to make the windows related together, like when you click one of them it brings them all, set the Owner before showing the window (assuming this is your main window)

    Window1 w = new Window1();
    w.Owner = this;
    
    0 讨论(0)
  • 2020-12-10 13:51

    Set the "secondary" windows' ShowInTaskbar property to false. Also it wouldn't hurt to set their Owner property to App.Current.MainWindow, so that the all the windows close (and hence the application exits) when the main window is closed.

    0 讨论(0)
提交回复
热议问题