如何从WPF中的窗口退出 [英] How to exit from a window in WPF
本文介绍了如何从WPF中的窗口退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我单击退出按钮时,我想从新窗口退出到上一个窗口.
我写的代码如下
NewComponentSalary ncs1 = new NewComponentSalary();
ncs1.Close();
NewComponentSalary是我的窗口名称.
但这不起作用
谁都知道.........
I want to exit from the new window to the previous window when click on a exit button.
I wrote the code as follows
NewComponentSalary ncs1 = new NewComponentSalary();
ncs1.Close();
NewComponentSalary is my window name.
But it doesn''t working
Anyone knows.........
推荐答案
在新窗口中调用this.close()
.
请参见此处 [
Callthis.close()
in your new window.
See here[^].
这篇关于如何从WPF中的窗口退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文