What is the use of ReturnType and TabIndex?

mshwfmshwf EGMember ✭✭✭

I'm expecting that when I set the ReturnType and TabIndex (optional if the order of the entry is the same as its order in the visual tree) for a group of entries, that tapping the return button of the keyboard will move the focus to the next entry but this never happened?

<StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
        <Entry TabIndex="1" Placeholder="Name" AutomationProperties.IsInAccessibleTree="True" ReturnType="Next"/>
        <Entry TabIndex="2" Placeholder="Email" AutomationProperties.IsInAccessibleTree="True" ReturnType="Next"/>
        <Entry TabIndex="3" Placeholder="Mobile" AutomationProperties.IsInAccessibleTree="True" ReturnType="Next" />
        <Entry TabIndex="4" Placeholder="Password" AutomationProperties.IsInAccessibleTree="True" ReturnType="Done"/>
        <Button Text="Submit" TabIndex="5" Clicked="Button_Clicked"
                AutomationProperties.IsInAccessibleTree="True"
                AutomationProperties.Name="Submit"
                AutomationProperties.HelpText="Submit any data"/>
    </StackLayout>

Here I set every accessibility property than can make this happens, but never get working, and the keyboard is dismissed when the tab button is tapped!

Best Answers

Answers

  • mshwfmshwf EGMember ✭✭✭
    edited March 16

    @JohnHardman thanks for clarification. I read the documentation, but didn't pay attention to the "appearance" meaning.
    Is there a good example (official) to implement this, I stumbled upon this but it requires a lot of xaml, the alternate is to use the Completed event in code behind

  • mshwfmshwf EGMember ✭✭✭

    @JohnHardman , I forgot to ask.. what is the use of TabIndex then?
    in docs:

    The VisualElement.TabIndex property is used to indicate the order in which VisualElement instances receive focus when the user navigates through controls by pressing the Tab key

    But what I concluded from your answer is that navigating is accomplished manually, not by the "Tab key", which I don't know which ReturnType enum field it associate with!

Sign In or Register to comment.