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?
David
  • 208,112
  • 36
  • 198
  • 279
Montgomery 'monty' Jones
  • 1,061
  • 2
  • 14
  • 27
  • It looks to me like you have a typo in the question title. You should fix that so people will be better able to find your question when browsing the site. – Al Crowley Aug 19 '10 at 13:30
  • You're not using the usual meaning of "tab stop" – tc. Aug 19 '10 at 13:40
  • 2
    Thanks for the feedback. @tc What is the "usual meaning"? @Al I guess you have also been confused by my use of tab-stop? What do you think is a typo? My understanding of a tabstop is something that will take focus as you move around the UI using the tab key. – Montgomery 'monty' Jones Aug 19 '10 at 13:54

1 Answers1

1

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
  • 187,081
  • 35
  • 232
  • 306