Setting the Focus to an Entry in Xamarin.Forms

后端 未结 6 876
天命终不由人
天命终不由人 2020-12-20 13:58

This is just a simplified example, but I\'m trying to set this up so that when I open up this page in my Application, the first thing that happens is the keyboard pops up re

6条回答
  •  醉酒成梦
    2020-12-20 14:19

    I know this is an old thread but this might work for someone as it worked for me.

    protected override async void OnAppearing()
    {
        base.OnAppearing();
        await Task.Delay(500);
        await Task.Run(() =>
        {
            entryname.Focus();
        });
    }
    

提交回复
热议问题