Welcome to Manicprogrammer Sign in | Join | Help

Rediscovering the Obvious

An occasional journey through one man's perspectives as he fumbles along in the footsteps of many great men.
Warning: Unexpected WPF focus behavior

I've got a login screen with a TextBox, a PasswordBox, and a Button (yeah yeah, just like everybody else).

Type login, hit tab, type password, hit tab, hit spacebar to click the button. (So far so good)

I did it right, so my new Page opens within my Frame (Yeah, that's the point)

But, I don't see any of the controls focused like I'd expect. And hitting tab doesn't bring the focus into view (Now that's odd...)

Well, as I discovered today, the button on the previous screen was still focused (Whoa!)

Lesson: When you navigate to a page, set the focus to that page, or have the page set its own focus as appropriate.

 

Published Thursday, August 09, 2007 3:29 PM by willeke

Filed under: ,

Comments

No Comments

Anonymous comments are disabled