我希望在子窗口中发生更改时通知父窗口 [英] I want to notify the Parent window when something changes in the Child window

查看:78
本文介绍了我希望在子窗口中发生更改时通知父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当子窗口发生更改时,我都希望重新启动父窗口。重启是一个手动过程。但事情是只有在父窗口发生更改并且用户尝试关闭应用程序时才会重新启动。现在
我想在子窗口中发生更改时通知父窗口以获得子窗口的重启功能

I want my parent window to be restarted whenever the changes happens in the child window. Restart is a manual process. But the thing is restart happens only when there is a change happens in the parent window and user tries to close the application. Now I want to notify the parent window whenever the change happens in the child window to attain the Restart functionality for child window also

我的父窗口:

privatevoid OnCloseWindowClick(object sender, RoutedEventArgs e)         {             if (ChangesMade) //Booling property checks whether changes happens or not             {                 ChangesMade = false;                                  RestartMethod();             }             Close(); // Closes the window after the restarting

}

有人可以帮助我在这个方法中做些什么来检查子窗口是否被修改。

Can somebody help what I have to do in this method to check whether the child window is modified or not.

非常感谢!!

推荐答案

你一定要提出这个问题无论是WinForms还是WPF论坛。

You should definitely move this question to either WinForms or WPF Forums.

我们需要知道你在处理什么。

We need to know what you are dealing with.


这篇关于我希望在子窗口中发生更改时通知父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆