找出为什么文本框失去焦点 [英] Find out why textbox has lost focus

查看:143
本文介绍了找出为什么文本框失去焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文本框失去了重点,我不知道为什么。我如何找出为什么失去焦点的原因?我试过听TextBox.LostFocus事件,但它的参数似乎没有给我任何关于原因的有价值的信息。

解决方案

您可以尝试 Snoop ,该工具可以侦听您应用中的所有活动。



您还可以尝试使用Visual Studio调试应用程序,在TextBox.LostFocus事件处理程序中设置断点,并检查调用堆栈,您可以查看哪个方法导致丢失的焦点。 / p>

A textbox looses focus and I don't know why. How can I find out the reason of why the focus is lost? I've tried listening to TextBox.LostFocus event, but it's parameters don't seem to give me any valuable information about the cause.

解决方案

You might try Snoop - a tool that listens to all events in your app.

You could also try to debug your app with Visual Studio, set a breakpoint in TextBox.LostFocus event handler, and inspecting the call stack, where you might see which method caused the lost focus.

这篇关于找出为什么文本框失去焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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