robburke.NET
© 2010 Robert Burke
All Rights Reserved.

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 1: It’s Basically Focus

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!