KeyboardTypeConverter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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 |
ConvertFrom(CultureInfo, Object) |
Obsolete.
When implemented in a derived class, converts an object that is a version of |
ConvertFrom(Object) |
Obsolete.
Calls ConvertFrom(CultureInfo, Object) with the current culture information and |
ConvertFromInvariantString(String) |
Returns a keyboard for a valid keyboard name. |