Notification when WPF UI closes

后端 未结 2 1750
囚心锁ツ
囚心锁ツ 2021-01-24 09:28

I am opening a WPF window from a tray app. I use the following code to open the window:

        if (gui == null)
        {
            gui = new App();
                  


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-24 10:16

    You should try out the Closing event. This article provides useful information about when a WPF is actually closing (not just the window).

提交回复
热议问题