WPF OnKeyUp in UserControl not firing
I have Window with UserControl. I subscri开发者_运维问答bed for OnKeyUp event but it does not firing. Inside UserControl constructor i use method this.Focus(); But still onkeyup does not firing. What is wrong and what i can to do to catch this event?
This is the silverlight scenario , I cannot say it will work in wpf!
keyUp event gets fired of the usercontrol and it works great , here is the code snippet how to register the event handler for KeyUp of usercontrol :
this.KeyUp += new KeyEventHandler(MainPage_KeyUp);
void MainPage_KeyUp(object sender, KeyEventArgs e)
{
}
精彩评论