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