[UWP] [VB]覆盖TextBox KeyDown& KeyUp事件 [英] [UWP][VB]Overriding the TextBox KeyDown & KeyUp Events

查看:52
本文介绍了[UWP] [VB]覆盖TextBox KeyDown& KeyUp事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个TextBox,我想要覆盖KeyDown& KeyUp事件。我有几个问题如下:

I have a TextBox for which I want to override the KeyDown & KeyUp events. I have several questions as follows:

1。在测试时,KeyUp事件总是被触发,但是如果用户在第一行按下Up键,或者在最后一行按下Down键,则触发KeyDown和KeyUp事件。为什么KeyDown事件不总是被触发?

1. While testing, the KeyUp event was always triggered, but both the KeyDown AND KeyUp events were triggered if the user pressed the Up key while on the first line, or the Down key while on the last line. Why is the KeyDown event not always triggered?

2。在我的应用程序中,有些情况下我想完全覆盖处理程序,根本不覆盖处理程序,以及我想在处理程序执行默认操作之前执行某些操作的情况。我该怎么做?

2. In my app, there are scenarios where I want to completely override the handler, not override the handler at all, and ones where I want to perform certain actions before letting the handler perform it's default actions. How do I do this?

任何人都可以帮我弄明白怎么做?谢谢。

Can anybody help me figure out how to do this? Thanks.

Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

推荐答案

您好,

对于问题一,您能否告诉我您的代码片段,了解如何覆盖您的处理程序并分享您的详细步骤?另一个问题是你的操作系统版本和Visual Studio版本是什么?

For question one, could you please show me your code snippet about how you override your handler and share me your detail steps? Another question is what's your OS version and Visual Studio's version?

对于问题二,在让处理程序执行默认操作之前执行某些操作是什么意思?你能告诉我你真实的情景吗?

For question two, what do you mean by perform certain actions before letting the handler perform it's default actions? Could you tell me your real scenarios?

祝你好运,

Roy


这篇关于[UWP] [VB]覆盖TextBox KeyDown& KeyUp事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆