简体   繁体   中英

WPF open a new window without closing the original window

I am trying to develop a software that requires the user to change windows a lot. Instead of opening a new window as a separate entity, I want the new window to replace the old window.

Currently I have this going...

Window Jobs_Window = new Jobs();
Jobs_Window.Show();
this.Close();

But that opens a new window and closes the old one, which looks messy.

What do I need to do to replace the contents of window 1 with contents of window 2?

与其使用不同的窗口,不如使用一个通过ContentPresenter托管各种用户控件的窗口。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM