I'm using VS2010,C# to develop a Silverlight online game, I use keyboard for getting user input, but users must initially click on silverligh canvas to activate keyboard (I have only one canvas in my scene which is not full screen, there is nothing else), how can I initially give focus to keyboard so that whenever the game starts user can play with keyboard (with no need to click on canvas), it is how I've set up my keyboard:
public MainPage()
{
InitializeComponent();
Loaded += new RoutedEventHandler(Page_Loaded);
}
void Page_Loaded(object sender, RoutedEventArgs e)
{
this.KeyDown += new KeyEventHandler(Page_KeyDown);
}
void Page_KeyDown(object sender, KeyEventArgs e)
{
....
}