I have some problem with Xamarin forms on Completed event which has been triggered when the control have focus (Entry)
Below is the View :
<Entry
x:Name="EntryOrderNumber"
Placeholder="MFGO Number"
Text="{Binding TextOrderEntry}" />
<Entry
x:Name="EntryMachineNumber"
Placeholder="Machine Number"
Text="{Binding TextMachineEntry}" />
And this is where I control the even which is placed at view.cs
public ProductionOrderPage()
{
InitializeComponent();
BindingContext = App.Locator.ProductionOrderPageVM;
EntryOrderNumber.Completed += EntryOrderNumber_Completed;
EntryMachineNumber.Completed += EntryMachineNumber_Completed;
EntryTotalPosition.Completed += EntryTotalPosition_Completed;
}
private void EntryMachineNumber_Completed(object sender, EventArgs e)
{
EntryMachineNumber.Unfocus();
EntryTotalPosition.Focus();
}
private void EntryOrderNumber_Completed(object sender, EventArgs e)
{
EntryOrderNumber.Unfocus();
EntryMachineNumber.Focus();
}
My problem is : While the Entry (Text field) has focused , the Completed event has been triggered which resulting in the focus will go to another field continuously as per set in the Completed event.
the apps being debugged and deployed onto emulator
using MVVMlight
Thanks a lot