Managing WPF keyboard focus can be a challenge, especially if you’re retrofitting an application that’s full of custom styles and templates, and lots of customized ItemControls, each of which was originally designed by your Designer principally for pointer-based input.
Tab-tab-tab between controls should “just work,” but it turns out, it’s a lot more complicated (with good reason) than just setting the tab order.
Mark Smith just posted a series of very practical series of three articles about this subject. However, he has no contact link or comments enabled in his blog (that I could find), so the best I can do is link to him here. Thank you Mark!
Part 2: Changing WPF Focus in Code
Part 3: Shifting focus to the first available element in WPF
My biggest learning from this process? No matter what you’re buliding, don’t let keyboard focus in your application be an afterthought!
Possibly Related Articles
- Are your CLR-based apps leaking?
- Productivity Tip: Re-map Caps Lock to the Application Key
- Silverlight Samurai Skills Follow-up
Posted Sep 17th, 2008
into Developer, Microsoft, WPF
with tags focus, keyboard, navigation
No Comments »
