KeyboardTypeConverter Class

Definition

A TypeConverter that converts a string into a Keyboard.

[Xamarin.Forms.Xaml.TypeConversion(typeof(Xamarin.Forms.Keyboard))]
public class KeyboardTypeConverter : Xamarin.Forms.TypeConverter
type KeyboardTypeConverter = class
    inherit TypeConverter
Inheritance
KeyboardTypeConverter
Attributes

Remarks

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

<Entry Keyboard="Keyboard.Telephone" /> 

The following shows some examples of KeyboardTypeConverter forms:

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));

Constructors

KeyboardTypeConverter()

Initializes a new instance of the KayboardTypeConverter class.

Methods

CanConvertFrom(Type)

When implemented in a derived class, returns a Boolean value that indicates whether or not the derived type converter can convert sourceType to its target type.

(Inherited from TypeConverter)
ConvertFrom(CultureInfo, Object)
Obsolete.

When implemented in a derived class, converts an object that is a version of value and that can be cast to the target type.

(Inherited from TypeConverter)
ConvertFrom(Object)
Obsolete.

Calls ConvertFrom(CultureInfo, Object) with the current culture information and o.

(Inherited from TypeConverter)
ConvertFromInvariantString(String)

Returns a keyboard for a valid keyboard name.

Applies to