Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to open keyboard on appear? #12

Open
Kiriakos41 opened this issue Feb 24, 2023 · 1 comment
Open

How to open keyboard on appear? #12

Kiriakos41 opened this issue Feb 24, 2023 · 1 comment

Comments

@Kiriakos41
Copy link

How to open keyboard on appear via xamarin forms focus dosent work..

@christian-strydom
Copy link

There is a method called FocusBox() that lets you set focus on the hidden text entry.

/// Calling this, will bring up the soft keyboard, or will help focus the control
/// </summary>
public void FocusBox()
{
    boxTapGestureRecognizer?.Command?.Execute(null);
}

So in your code-behind you can just call:

protected override void OnAppearing()
{
    base.OnAppearing();
    XfPinView.FocusBox();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants