Table of Contents

Delegate DisplayPromptAsyncDelegate

Namespace
Alternet.Maui
Assembly
Alternet.UI.Maui.dll

Defines delegate that displays a prompt dialog to the application user with the intent to capture a single string value.

public delegate Task<string> DisplayPromptAsyncDelegate(object? owner, string title, string message, string accept = "OK", string cancel = "Cancel", string? placeholder = null, int maxLength = -1, Keyboard? keyboard = null, string initialValue = "")

Parameters

owner object

The object which called the prompt dialog.

title string

The title of the prompt dialog.

message string

The body text of the prompt dialog.

accept string

Text to be displayed on the 'Accept' button.

cancel string

Text to be displayed on the 'Cancel' button.

placeholder string

The placeholder text to display in the prompt. Can be null when no placeholder is desired.

maxLength int

The maximum length of the user response.

keyboard Keyboard

The keyboard type to use for the user response.

initialValue string

A pre-defined response that will be displayed, and which can be edited by the user.

Returns

Task<string>

A Task that displays a prompt display and returns the string value as entered by the user.