views:

56

answers:

1

I am working on a silverlight application with a significant number of invisible tab stops. I am currently busy trying to track them all down and eliminate them.

I am aware that any control that inherits from System.Windows.Controls.Control can take focus and yet I still can't identify where the focus is be going for much of the time when I press tab to move round the UI.

So, my questions are:

  • Will everything that acts as a tab-stop also take focus (and visa versa)?
  • What, apart from anything that inherits from Control, can act as a tab-stop?
A: 

There is little point in something being a tab-stop if doesn't "also take focus". However not everything that can take focus need be a tab-stop, for example, a control may take the focus when clicked on by the mouse but not via the tab key.

In Silverlight there is nothing that can act as a tab stop that is not also a Control.

The Control class has a IsTabStop property which by default is true. If you have been building your own controls its up to you to build visual states to indicate that the control has the focus. If your control doesn't need the focus for any reason then clear its IsTabStop property early in its constructor.

AnthonyWJones