I'm brand new to xamarin and have been trying to develop a workaround to this issue: I have a Stack Layout that contains a N amount of entries, depending in what the user needs.
<ScrollView>
<StackLayout x:Name="Visual" Padding="5,5,5,20">
<StackLayout x:Name="EntradasPeso" />
</StackLayout>
</ScrollView>
I add them dynamically, through a loop:
//calculo.Qnt_amostra is the ammount of entries that the view has.
for (int i = 1; i <= (int)calculo.Qnt_amostra; i++)
{
CustomEntry peso = new CustomEntry();
peso.IsNumeric = true;
peso.Placeholder = $"Peso da {i}° amostra";
peso.Keyboard = Keyboard.Numeric;
peso.Completed += Peso_Completed;
EntradasPeso.Children.Add(peso);
}
The problem is that, they don't have a x:Name (as far as I Know). So, how do I set this custom entry to focus the next element in the view? Having in mind that I can't do this:
EntradasPeso.Focus(nameofentry)
Can anyone help me?
private void Peso_Completed(object sender, EventArgs e)
{
// focus to next entry
}