且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何关闭窗口但仍使应用程序处于活动状态?

更新时间:2023-02-20 12:35:53

        Application.Current.MainWindow.Hide();

您可以使用此行隐藏窗口...或者您可以使用构造函数将要使用的信息传递到新窗口中.

You can hide the window using this line... or you can pass the information that you want to use into the new window using the constructor.

        DisplayWindow window = new DisplayWindow(object myObject);

那个构造函数必须有你想要传递的信息,但这也可以解决问题.

That constructor must have the information you want passed but this can solve the issue as well.