Table of Contents

Method AskTextAsync

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

AskTextAsync(string, Action<string>, string?)

Displays a prompt to the user with a specified title and an optional default value, and invokes a callback with the user's input.

public static void AskTextAsync(string title, Action<string> onApply, string? defaultValue = null)

Parameters

title string

The title of the prompt displayed to the user.

onApply Action<string>

A callback action that is invoked with the user's input when the prompt is confirmed. The input is guaranteed to be non-null.

defaultValue string

The default value pre-filled in the prompt. This parameter is optional and can be null.