TextInputDialog.Show 方法

定义

重载

Show(String, String, String, String)

显示文本输入对话框。

Show(String, String, String, Predicate<String>, String)

显示文本输入对话框。

Show(String, String, Int32, String, Predicate<String>, String)

显示文本输入对话框。

Show(String, String, String, String)

显示文本输入对话框。

public:
 static bool Show(System::String ^ title, System::String ^ prompt, System::String ^ defaultText, [Runtime::InteropServices::Out] System::String ^ % text);
public static bool Show (string title, string prompt, string defaultText, out string text);
static member Show : string * string * string * string -> bool
Public Shared Function Show (title As String, prompt As String, defaultText As String, ByRef text As String) As Boolean

参数

title
String

对话框的标题。

prompt
String

对话框的提示文本。

defaultText
String

对话框的输入框的默认值。

text
String

弄此方法返回时,此参数包含用户的输入文本。 如果用户取消了对话框,则此参数为 null。

返回

Boolean

如果用户提交了文本,则为 True。 如果用户取消了对话框,则为 False。

适用于

Show(String, String, String, Predicate<String>, String)

显示文本输入对话框。

public:
 static bool Show(System::String ^ title, System::String ^ prompt, System::String ^ defaultText, Predicate<System::String ^> ^ validator, [Runtime::InteropServices::Out] System::String ^ % text);
public static bool Show (string title, string prompt, string defaultText, Predicate<string> validator, out string text);
static member Show : string * string * string * Predicate<string> * string -> bool
Public Shared Function Show (title As String, prompt As String, defaultText As String, validator As Predicate(Of String), ByRef text As String) As Boolean

参数

title
String

对话框的标题。

prompt
String

对话框的提示文本。

defaultText
String

对话框的输入框的默认值。

validator
Predicate<String>
text
String

弄此方法返回时,此参数包含用户的输入文本。 如果用户取消了对话框,则此参数为 null。

返回

Boolean

如果用户提交了文本,则为 True。 如果用户取消了对话框,则为 False。

适用于

Show(String, String, Int32, String, Predicate<String>, String)

显示文本输入对话框。

public:
 static bool Show(System::String ^ title, System::String ^ prompt, int maxLength, System::String ^ defaultText, Predicate<System::String ^> ^ validator, [Runtime::InteropServices::Out] System::String ^ % text);
public static bool Show (string title, string prompt, int maxLength, string defaultText, Predicate<string> validator, out string text);
static member Show : string * string * int * string * Predicate<string> * string -> bool
Public Shared Function Show (title As String, prompt As String, maxLength As Integer, defaultText As String, validator As Predicate(Of String), ByRef text As String) As Boolean

参数

title
String

对话框的标题。

prompt
String

对话框的提示文本。

maxLength
Int32

对话框输入的最大长度。

defaultText
String

对话框的输入框的默认值。

validator
Predicate<String>

用于计算是否应接受输入的谓词。

text
String

弄此方法返回时,此参数包含用户的输入文本。 如果用户取消了对话框,则此参数为 null。

返回

Boolean

如果用户提交了文本,则为 True。 如果用户取消了对话框,则为 False。

适用于