Xamarin.Forms Guides | Samples

Xamarin.Forms.KeyboardTypeConverter Class

A TypeConverter that converts a string into a Keyboard.

See Also: KeyboardTypeConverter


public class KeyboardTypeConverter : TypeConverter


The following XAML snippet illustrates a case where a KeyboardTypeConverter is used behind the scenes:

XAML Example

<Entry Keyboard="Keyboard.Telephone" />

The following shows some examples of KeyboardTypeConverter forms:

C# Example

var converter = new KeyboardTypeConverter ();
foreach (var kvp in new Dictionary<string, Keyboard> {
	{"Keyboard.Default", Keyboard.Default},
	{"Keyboard.Email", Keyboard.Email},
	{"Keyboard.Text", Keyboard.Text},
	{"Keyboard.Url", Keyboard.Url},
	{"Keyboard.Telephone", Keyboard.Telephone},
	{"Keyboard.Chat", Keyboard.Chat},
Assert.AreSame (kvp.Value, converter.ConvertFrom (kvp.Key));


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,

The members of Xamarin.Forms.KeyboardTypeConverter are listed below.

See Also: TypeConverter

Public Constructors

Initializes a new instance of the KayboardTypeConverter class.

Public Methods

CanConvertFrom(Type) : Boolean
Returns wheher this converter can convert an object of the given type.
ConvertFrom(CultureInfo, Object) : Object
TConvert the given value into a Keyboard.
ConvertFromInvariantString(String) : Object
Returns a keyboard for a valid keyboard name.