KeyboardTypeConverter KeyboardTypeConverter Class


A TypeConverter that converts a string into a Keyboard.

public class KeyboardTypeConverter : Xamarin.Forms.TypeConverter
type KeyboardTypeConverter = class
    inherit TypeConverter


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


KeyboardTypeConverter() KeyboardTypeConverter()

Initializes a new instance of the KayboardTypeConverter class.


CanConvertFrom(Type) 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) ConvertFrom(CultureInfo, Object)

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) ConvertFrom(Object)

Calls Xamarin.Forms.TypeConverter.ConvertFrom(System.Globalization.CultureInfo, object) with the current culture information and o.

(Inherited from TypeConverter)
ConvertFromInvariantString(String) ConvertFromInvariantString(String)

Returns a keyboard for a valid keyboard name.

Extension Methods

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to