internal void Close(object parameter) { var dialogClosingEventArgs = new DialogClosingEventArgs(_session, parameter, DialogClosingEvent); _session.IsEnded = true; //多种可能关闭Dialog的方式 OnDialogClosing(dialogClosingEventArgs); _attachedDialogClosingEventHandler?.Invoke(this, dialogClosingEventArgs); DialogClosingCallback?.Invoke(this, dialogClosingEventArgs); _asyncShowClosingEventHandler?.Invoke(this, dialogClosingEventArgs); if (!dialogClosingEventArgs.IsCancelled) { SetCurrentValue(IsOpenProperty, false); } else { _session.IsEnded = false; } _closeDialogExecutionParameter = parameter; }
protected void OnDialogClosing(DialogClosingEventArgs eventArgs) { RaiseEvent(eventArgs); }