Skip to content

codechem/Xam.CrossKeyboard

Repository files navigation

Keyboard plugin for Xamarin.Forms

Simple cross platform plugin to get keyboard events and keyboard height on CrossPlatform level.

NOTE: Restoring package will give warning of using .NETFramework but it will work perfectly fine.

Nuget

Available on NuGet: Xam.CrossKeyboard

Documentation

  1. Install nuget package
  2. Subscribe to KeyboardStateChanged event that is provided by XKeyboard.Current and listen to triggered changes. This event sends KeyboardStateEventArgs as argument, which contains KeyboardEventType and current visible KeyboardHeight.

KeyboardEventTypes can be: WillShow, DidShow, WillHide, DidHide.

Sample

XKeyboard.Current.KeyboardStateChanged += Current_KeyboardStateChanged;

private void Current_KeyboardStateChanged(object sender, KeyboardStateEventArgs e)
{
    KeyboardHeight = e.KeyboardHeight.ToString();
    KeyboardEventType = e.EventType.ToString();
}

For more detailed sample click here

License

The MIT License (MIT). See License File

Contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages