Class KeyboardInput
Provides access to the keyboard input user interface.
public static class KeyboardInput
- Inheritance
-
KeyboardInput
- Inherited Members
Properties
IsVisible
Determines if a keyboard user interface screen is active.
public static bool IsVisible { get; }
Property Value
Methods
Cancel(string)
Hides the keyboard input interface and returns the parameter as the result of Show(string, string, string, bool)
public static void Cancel(string result)
Parameters
resultstringResult to return
Examples
var nameTask = KeyboardInput.Show("Name", "What's your name?", "Player");
KeyboardInput.Cancel("John Doe");
var name = await nameTask;
Exceptions
- Exception
Thrown when the keyboard input is not visible
Show(string, string, string, bool)
Displays the keyboard input interface asynchronously.
public static Task<string> Show(string title, string description, string defaultText = "", bool usePasswordMode = false)
Parameters
titlestringTitle of the dialog box.
descriptionstringDescription of the dialog box.
defaultTextstringDefault text displayed in the input area.
usePasswordModeboolIf password mode is enabled, the characters entered are not displayed.
Returns
Examples
var name = await KeyboardInput.Show("Name", "What's your name?", "Player");
Exceptions
- Exception
Thrown when the message box is already visible