开发者

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)
        {

        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜