[垃圾microsoft, 要啥缺啥] c# metro app keydown issue
来源:互联网 发布:wifi迅雷网络异常 编辑:程序博客网 时间:2024/06/05 16:26
下面这段代码是用来检测在textbox里 keydown event:
private void txtTest_KeyDown(object sender, KeyRoutedEventArgs e) { lblInfo.Text = lblInfo.Text + "," + (int)e.Key; }
和keyboard reader完全无关,因为你就算用virtual keyboard来在textbox里输入信息也是同样效果。
如果不是textbox,而是Controls.Page 来trigger keydown event, 因为对于中文输入法,textbox虽然捕捉不到keydown event,但可以通过获取textbox.text来获得card info。if use controls.page to trigger keydown event, then there must be at least one component in the page. passwordBox or button component is recommended (it looks that no chinese input issue for passwordbox and button), DON'T use textbox because of chinese input issue.
Note: if no component in the page is focused (for example, you tap any other area in the page), then it will not trigger any keydown event!!! Hence when the component lose focus, focus again.
Therefore, my solution of visitor log project smart reader view as below.
1. in the page, there is only one "cancel" button except 2 labels. When the button is clicked, back to parent page. If this button lose focus, focus again.
2. It seems that you needn't set this button focused explicitly, if it is only one component in page, it will be focused automatically when page is loaded.
- [垃圾microsoft, 要啥缺啥] c# metro app keydown issue
- c# keydown
- [c# metro app] debug output to console
- C++ Metro App 同C# Metro App 引用winmd库方法
- Microsoft Printer issue
- C# KeyDown与KeyPress
- [垃圾microsoft, 要啥缺啥] 如何设置缺省输入法
- 转载: c# keydown keypress keyup
- c# KeyDown,KeyPress 和KeyUp
- windows metro app c#工程调用c++写的静态库
- C# XmlDocument SelectNodes issue
- keydown
- keyDown
- Metro App中使用Timer
- windows metro app 学习中心
- 关于metro app 中的chart
- Metro App生命周期之概述
- Metro Style App :动画概要
- Oracle字符集的查看和Oracle字符集的设置修改
- 我会好好的
- Visual Studio 跨平台开发实战(3) - Xamarin iOS 多页面应用程式开发
- windows 2008下服务无法安装的解决方式
- mysql导入sql文件错误#1044 - Access denied for user 'root'@'localhost'
- [垃圾microsoft, 要啥缺啥] c# metro app keydown issue
- 创业是不归路
- tomcat启动报错,以下是错误日志
- Oracle常用语句 .
- OpenCV 2.4.3 Cheat Sheet学习
- JAVA-this
- 你想干嘛啊
- linux 进程间通信
- marquee 滚动