public void Close(bool success, PopupParameters parameters) { var popup = this.Popups.Pop(); popup.TaskSource.SetResult(new PopupResult(success, parameters)); OnPopupsUpdated?.Invoke(); }
public Task <PopupResult> Show(Type componentType, PopupParameters parameters) { // Build the popup var popup = new Popup(componentType); foreach (var parameter in parameters) { popup.Parameters.Add(parameter.Key, parameter.Value); } // Add popup to the container this.Popups.Push(popup); // Prevents the container OnPopupsUpdated?.Invoke(); // Wait for the popup to be closed return(popup.Task); }