开发者

WPF: Adorner not receiving any keyboard events

开发者 https://www.devze.com 2022-12-28 08:32 出处:网络
I have an Adorner and I want that Adorner to be able to receive keyboard events, but I\'m having problems with those whole focus stuff. Can somebody please tell, what has to be done to make an adorner

I have an Adorner and I want that Adorner to be able to receive keyboard events, but I'm having problems with those whole focus stuff. Can somebody please tell, what has to be done to make an adorner able to receive keyboard events? Thank you v开发者_运维百科ery much for any help!


Here's the solution:

adorner.Focusable=true;
Keyboard.Focus(adorner);
0

精彩评论

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