/// <summary> /// Shows the Data Input Form in a modal dialog container. /// </summary> /// <param name="modalDialogService">The Modal Dialog Service</param> /// <param name="options">options that affect how the dialog behaves (can be null)</param> /// <returns> /// false if the user cancelled for form. /// true if the user completed the form (including any validation) /// The values the user entered are in the <see cref="Fields"/> that were created with the AddXXField methods /// </returns> public async Task <bool> ShowAsync(IModalDialogService modalDialogService, ModalDialogOptions options = null) { if (modalDialogService == null) { throw new ArgumentNullException(nameof(modalDialogService)); } ModalDialogParameters mParams = new ModalDialogParameters(); mParams.Add("Form", this); var result = await modalDialogService.ShowDialogAsync <Components.DataInputForm>(this.Title, options, mParams); return(result.Success); }