65.9K
Home

Last Resort WPF Focus Solution

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.86/5 (6 votes)

Aug 26, 2015

CPOL

2 min read

viewsIcon

9885

If you are having issues with getting the WPF Focus() method working, then maybe all you need to do is add a delay on the Initialized event before setting the focus. This solution is a nice demonstration of the features of TPL, and how easy TPL can make doing asynchronous programming in the UI.