KeyDown Event is not responding till any user control is clicked or setFocus implicitly ?
- by Subhen
KeyDown Event is not responding till any user control is clicked or setFocus implicitly . I want to fire the key event after the page loads , anytime.
I tried like :
private void Page_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key.ToString() == "Escape")
{
string uri = "/Views/Music/ArtistbyAlbum";
this.NavigationService.Navigate(new Uri(uri, UriKind.Relative));
}
}
void LayoutRoot_KeyDown(object sender, KeyEventArgs e)
{
MessageBox.Show("hi");
}
Please help.
Thanks,
Subhen