关于
this MSDN page(或任何相关页面),它指出:
When you change the focus by using the keyboard,focus events occur in
the following order:
- Enter
- GotFocus
- Leave
- Validating
- Validated
- LostFocus
但是,当您使用鼠标引发事件时,订单更改!
When you change the focus by using the mouse or by calling the Focus method,focus events occur in the following order:
- Enter
- GotFocus
- LostFocus
- Leave
- Validating
- Validated
这不会使事件链完全不同吗?我的解释是,键盘链确保一切正常工作,然后引发LostFocus事件.然而,鼠标事件似乎在由于某种原因进行验证之前提高了.这是为什么?