Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
787 views
in Technique[技术] by (71.8m points)

wpf - Multiple windows, but also multiple items on the task bar

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. The problem is that each window opens up a new tab on the taskbar. Is there anyway that I can still have my three windows with only one related item on the taskbar?

If possible, I would not like to make them all child forms and have to sit inside of another box.

Thank you

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...