Xamarin.Forms 将默认值绑定到 DisplayPromptAsync

Xamarin.Forms bind default value to DisplayPromptAsync

是否可以 DisplayPromptAsync :

await DisplayPromptAsync("", "DEFAULT VALUE IS:", "ОК", "CANCEL","PLACEHOLDER");

添加默认值?

例如,我想在用户打开 DisplayPrompt 时提供建议电子邮件。

是的,最新版本中有一个参数

public System.Threading.Tasks.Task<string> DisplayPromptAsync (
    string title, string message, string accept = "OK", 
    string cancel = "Cancel", string placeholder = default, 
    int maxLength = -1, Xamarin.Forms.Keyboard keyboard = default, 
    string initialValue = "");

使用initialValue