If you want to take control of tab sequence, you can set the TabIndex property for each
control to place it in numerical order. The control with a TabIndex of 0 gets the focus first, followed
by the next highest TabIndex value (for example, 1, then 2, then 3, and so on). If more
than one element has the same TabIndex value, WPF uses the automatic tab sequence, which
means it jumps to the nearest subsequent element.
nTip By default, the TabIndex property for all controls is set to 1. That means you can designate a specific
control as the starting point for a window by setting its TabIndex to 0 but rely on automatic navigation to
guide the user through the rest of the window from that starting point, according to the order that your
elements are defined.
The TabIndex property is defined in the Control class, along with an IsTabStop property.
You can set IsTabStop to False to prevent a control from being included in the tab sequence.
The difference between IsTabStop and Focusable is that a control with an IsTabStop value of
False can still get the focus in another way??”either programmatically (when your code calls
its Focus() method) or by a mouse click.
Controls that are invisible or disabled (???grayed out???) are generally skipped in the tab order
and are not activated regardless of the TabIndex, IsTabStop, and Focusable settings.
Pages:
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344