I'm using an integrated barcode scanner for an app with Xamarin Forms and I want to set focus on an Edit
field every time that I am on the view. However, I have another button on my page. So, is there a way to set Focus on my Edit
at all times? ( I use focus because the barcode scanner complete automatically the field which is the focus )
CodePudding user response:
I found an issue to my problem.
In my xaml file
<Entry x:Name="myEntry"
Unfocused="Entry_Unfocused" />
In my c# file
private void Entry_Unfocused(object sender, FocusEventArgs e)
{
this.myEntry.Focus()
}