Class
DialogFactory

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:

cs-api-definition
public class DialogFactory

Inheritance: objectDialogFactory

Methods

AlertAsync(string)

Opens an alert dialog with default title.

Declaration

cs-api-definition
public Task AlertAsync(string text)

Parameters

text

string

The text of the dialog.

Returns

Task

AlertAsync(string, string)

Opens an alert dialog.

Declaration

cs-api-definition
public Task AlertAsync(string text, string title)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

Returns

Task

AlertAsync(string, string, string)

Opens an alert dialog.

Declaration

cs-api-definition
public Task AlertAsync(string text, string title, string okButtonText)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

okButtonText

string

The text of the "OK" button of the dialog.

Returns

Task

ConfirmAsync(string)

Opens a confirm dialog with default title.

Declaration

cs-api-definition
public Task<bool> ConfirmAsync(string text)

Parameters

text

string

The text of the dialog.

Returns

Task<bool>

Whether the use confirms or not.

ConfirmAsync(string, string)

Opens a confirm dialog.

Declaration

cs-api-definition
public Task<bool> ConfirmAsync(string text, string title)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

Returns

Task<bool>

Whether the use confirms or not.

ConfirmAsync(string, string, string, string)

Opens a confirm dialog.

Declaration

cs-api-definition
public Task<bool> ConfirmAsync(string text, string title, string okButtonText, string cancelButtonText)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

okButtonText

string

The text of the "OK" button of the dialog.

cancelButtonText

string

The text of the "Cancel" button of the dialog.

Returns

Task<bool>

Whether the use confirms or not.

PromptAsync(string)

Opens a prompt dialog with default title.

Declaration

cs-api-definition
public Task<string> PromptAsync(string text)

Parameters

text

string

The text of the dialog.

Returns

Task<string>

The input entered by the user.

PromptAsync(string, string)

Opens a prompt dialog.

Declaration

cs-api-definition
public Task<string> PromptAsync(string text, string title)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

Returns

Task<string>

The input entered by the user.

PromptAsync(string, string, string)

Opens a prompt dialog.

Declaration

cs-api-definition
public Task<string> PromptAsync(string text, string title, string defaultInputText)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

defaultInputText

string

The default text of the input.

Returns

Task<string>

The input entered by the user.

PromptAsync(string, string, string, string, string)

Opens a prompt dialog.

Declaration

cs-api-definition
public Task<string> PromptAsync(string text, string title, string defaultInputText, string okButtonText, string cancelButtonText)

Parameters

text

string

The text of the dialog.

title

string

The title of the dialog.

defaultInputText

string

The default text of the input.

okButtonText

string

The text of the "OK" button of the dialog.

cancelButtonText

string

The text of the "Cancel" button of the dialog.

Returns

Task<string>

The input entered by the user.