【发布时间】:2019-12-02 07:43:25
【问题描述】:
在使用 Caliburn Micro 时,是否可以检测到窗口是如何关闭的? IE。如果通过TryClose() 或通过窗口右上角的十字关闭它?
基于this post,我找到了一种方法来捕捉关闭,甚至使用下面的代码,但我似乎找不到任何表明关闭是如何启动的属性?
public override void CanClose(Action<bool> callback)
{
// Only do this, if closed via the cross in the upper right corner of the window
callback(false);
}
【问题讨论】:
标签: c# caliburn.micro