Focus on Silverlight App At Startup – Problem Solved
I finally figured out the way to set focus to a Silverlight control on start-up: just set focus to your app, then set the control focus on the dispatcher to give the app time to process whatever it needs to when it gets focus. In other words, in the root visual constructor use this code:
HtmlPage.Plugin.Focus(); Dispatcher.BeginInvoke(() => YourControl.Focus());
This may be the first (and probably the last) actual Silverlight mystery I have solved. A couple months ago, I was searching the internet for the way to do this and found absolutely nothing.
Yippee-Kai-Yay for me 😉