WPF MVVM: How to close a window

后端 未结 21 1767
后悔当初
后悔当初 2020-12-04 08:19

I have a Button that closes my window when it\'s clicked:


21条回答
  •  暖寄归人
    2020-12-04 08:35

    Simple approach is close window on saveComand Implementation. Use below code to close window.

    Application.Current.Windows[1].Close();
    

    It will close the child window.

提交回复
热议问题