/// <summary> /// Shows the dialog asynchronously. The task will be completed when the dialog is fully shown. /// </summary> /// <param name="parameter">Parameter.</param> public async Task ShowAsync(object parameter = null) { _showSemaphore = new SemaphoreSlim(0); DialogWillShow?.Invoke(this, EventArgs.Empty); Show(parameter); await _showSemaphore.WaitAsync(); }
/// <summary> /// Shows the dialog with given parameter. /// </summary> /// <param name="parameter">Parameter which can be passed to dialog's ViewModel.</param> public void Show(object parameter = null) { DialogsManager.CurrentlyDisplayedDialog = this; DialogWillShow?.Invoke(this, EventArgs.Empty); Parameter = parameter; Show(ConfiguredFragmentManager, FragmentTag); OnShown(); DialogShown?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Shows the dialog with given parameter. /// </summary> /// <param name="parameter">Parameter which can be passed to dialog's ViewModel.</param> public async void Show(object parameter = null) { DialogsManager.CurrentlyDisplayedDialog = this; DialogWillShow?.Invoke(this, EventArgs.Empty); Parameter = parameter; await base.ShowAsync(ContentDialogPlacement.Popup); OnShown(); DialogShown?.Invoke(this, EventArgs.Empty); }