namespace Xamarin.Forms.Platform.Tizen { public static class KeyboardExtensions { /// /// Creates an instance of ElmSharp.Keyboard reflecting the provided Xamarin.Forms.Keyboard instance /// /// Keyboard type corresponding to the provided Xamarin.Forms.Keyboard /// The Xamarin.Forms.Keyboard class instance to be converted to ElmSharp.Keyboard. public static Native.Keyboard ToNative(this Keyboard keyboard) { if (keyboard is TextKeyboard) { return Native.Keyboard.Normal; } else if (keyboard is NumericKeyboard) { return Native.Keyboard.Number; } else if (keyboard is TelephoneKeyboard) { return Native.Keyboard.PhoneNumber; } else if (keyboard is EmailKeyboard) { return Native.Keyboard.Email; } else if (keyboard is UrlKeyboard) { return Native.Keyboard.Url; } else if (keyboard is ChatKeyboard) { return Native.Keyboard.Emoticon; } else { return Native.Keyboard.Normal; } } } }