Class MBConfirmationDialog
A confirmation dialog requiring the user to type in either a generated six digit sequence or a string provided in ConfirmationPhrase.
The consumer can elect to use standard "OK" and "Cancel" buttons by leaving UnconfirmedButtons and ConfirmedButtons
null, in which case the "OK" button gives the dialog an action result of ConfirmActionResult, or CancelActionResult
for the "Cancel" button.
Alternatively the consumer can supply render fragments with buttons to UnconfirmedButtons and ConfirmedButtons. The former
is rendered until the correct confirmaton text is entered into the text box at which point it is replaced with the latter. Typically
these are identical save that one or more of the repeated buttons in UnconfirmedButtons is disabled, but not in ConfirmedButtons.
This components throws an ArgumentException if one of these render fragments is set while the other is not.
Inheritance
MBConfirmationDialog
Assembly: Material.Blazor.dll
Syntax
public class MBConfirmationDialog
Fields
|
Improve this Doc
View Source
CancelActionResult
Declaration
public const string CancelActionResult = "cancel"
Field Value
|
Improve this Doc
View Source
ConfirmActionResult
Declaration
public const string ConfirmActionResult = "confirm"
Field Value
Properties
|
Improve this Doc
View Source
ActionPhrase
Declaration
public string ActionPhrase { get; set; }
Property Value
|
Improve this Doc
View Source
Body
The dialog body, with the confirmation paragraph rendered beneath it and the
confirmation text field beneath that.
Declaration
public RenderFragment Body { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
|
Improve this Doc
View Source
ConfirmationDisabled
Disables the confirmation text field if True.
Declaration
public bool ConfirmationDisabled { get; set; }
Property Value
|
Improve this Doc
View Source
ConfirmationPhrase
Optional confirmation text. If omitted a random six digit code is generated for confirmation.
Declaration
public string ConfirmationPhrase { get; set; }
Property Value
|
Improve this Doc
View Source
A render fragment containing buttons in the confirmed state, typically none
disabled and they should otherwise UnconfirmedButtons.
Both this and UnconfirmedButtons should be set
or both null in unison.
Declaration
public RenderFragment ConfirmedButtons { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
|
Improve this Doc
View Source
OverflowVisible
Dialogs by default apply overflow: hidden;
. This means that selects or datepickers are often
cropped. Set this parameter to true to make the dialog apply overflow: visible;
to rectify this.
Defaults to false.
Declaration
public bool OverflowVisible { get; set; }
Property Value
|
Improve this Doc
View Source
Title
Declaration
public string Title { get; set; }
Property Value
|
Improve this Doc
View Source
A render fragment containing buttons in the unconfirmed state, typically one
or more should be disabled. Both this and ConfirmedButtons should be set
or both null in unison.
Declaration
public RenderFragment UnconfirmedButtons { get; set; }
Property Value
Type |
Description |
RenderFragment |
|
Methods
|
Improve this Doc
View Source
HideAsync()
Declaration
Returns
|
Improve this Doc
View Source
Declaration
protected override async Task OnParametersSetAsync()
Returns
|
Improve this Doc
View Source
ShowAsync()
Declaration
public Task<string> ShowAsync()
Returns