Each panel has a focus ring that defines the focus order of elements. By default, a depth-first search (DFS) on the visual tree defines the focus order of elements. For example, the focus order for the tree depicted below is F, B, A, D, C, E, G, I, H.
Some events use the focus order to define which element holds the focus. For example, the target for a keyboard event is the element in focus.
focusable プロパティを使用します。デフォルトで VisualElements はフォーカス可能ではありませんが、TextField などのサブクラスの中には、デフォルトでフォーカス可能なものがあります。Use the tabIndex property to control the focus order as follows (tabIndex default value of 0):
tabIndex が負の値の場合は、要素でタブを使うことはできません。focus-index が 0 の場合、要素はフォーカスリングアルゴリズムによって決定されたデフォルトのフォーカス順序を維持します。tabIndex が正の場合、その要素は tabIndexが 0 (tabIndex = 0) か、tabIndex 値がそれ自体より小さい他の要素の前に置かれます。