ClassDialogFactory
Exposes API for opening predefined dialogs - Alert, Confirm and Prompt. Get it in your components from a CascadingParameter.
Definition
Namespace:Telerik.Blazor
Assembly:Telerik.Blazor.dll
Syntax:
public class DialogFactory
Inheritance: objectDialogFactory
Methods
AlertAsync(string)
Opens an alert dialog with default title.
AlertAsync(string, string)
Opens an alert dialog.
AlertAsync(string, string, string)
Opens an alert dialog.
ConfirmAsync(string)
Opens a confirm dialog with default title.
ConfirmAsync(string, string)
Opens a confirm dialog.
ConfirmAsync(string, string, string, string)
Opens a confirm dialog.
Declaration
public Task<bool> ConfirmAsync(string text, string title, string okButtonText, string cancelButtonText)
Parameters
text
The text of the dialog.
title
The title of the dialog.
okButtonText
The text of the "OK" button of the dialog.
cancelButtonText
The text of the "Cancel" button of the dialog.
Returns
Whether the use confirms or not.
PromptAsync(string)
Opens a prompt dialog with default title.
PromptAsync(string, string)
Opens a prompt dialog.
PromptAsync(string, string, string)
Opens a prompt dialog.
Declaration
public Task<string> PromptAsync(string text, string title, string defaultInputText)
Parameters
text
The text of the dialog.
title
The title of the dialog.
defaultInputText
The default text of the input.
Returns
The input entered by the user.
PromptAsync(string, string, string, string, string)
Opens a prompt dialog.
Declaration
public Task<string> PromptAsync(string text, string title, string defaultInputText, string okButtonText, string cancelButtonText)
Parameters
text
The text of the dialog.
title
The title of the dialog.
defaultInputText
The default text of the input.
okButtonText
The text of the "OK" button of the dialog.
cancelButtonText
The text of the "Cancel" button of the dialog.
Returns
The input entered by the user.