开发者

How I can notify wpf owned window of closing?

If i set a owned window like that :

OwnedWindow ownedWindow = new OwnedWindow();
ownedWindow.Owner = this;
ownedWindow.Show();

it' possible to get notificated 开发者_Python百科about the ownedWindow closing?


Yes.

OwnedWindow ownedWindow = new OwnedWindow();
ownedWindow.Owner = this;
ownedWindow.Closing += new System.ComponentModel.CancelEventHandler(ownedWindow_Closing);
ownedWindow.Show();

This handler should be in owner window.

void ownedWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜