/// <inheritdoc /> public sealed override void DismissAllowingStateLoss() { DialogWillHide?.Invoke(this, EventArgs.Empty); CancelResult(); base.DismissAllowingStateLoss(); OnHidden(); DialogHidden?.Invoke(this, EventArgs.Empty); DialogsManager.CurrentlyDisplayedDialog = null; }
internal void HideInternal(bool fromHidden) { DialogWillHide?.Invoke(this, EventArgs.Empty); CancelResult(); if (!fromHidden) { base.Hide(); } OnHidden(); DialogHidden?.Invoke(this, EventArgs.Empty); DialogsManager.CurrentlyDisplayedDialog = null; }
/// <summary> /// Hides the dialog asynchronously. The task will be completed once the dialog has fully disappeared. /// </summary> public async Task HideAsync() { _hideSemaphore = new SemaphoreSlim(0); DialogWillHide?.Invoke(this, EventArgs.Empty); if (AnimationConfig.HideAnimationType == DialogAnimationType.CustomBlurFade) { await Task.Delay((int)(AnimationConfig.HideCustomAnimationDurationSeconds * 1000)); } Hide(); await _hideSemaphore.WaitAsync(); }