在fpf中,gotfocus和gotkeyboardfocus有什么区别? [英] What is the difference between gotfocus and gotkeyboardfocus in wpf?

查看:143
本文介绍了在fpf中,gotfocus和gotkeyboardfocus有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 GotFocus和GotKeyboardFocus之间的区别  wpf? 





我的尝试:



我试图通过设置属性来打开和关闭Popup:IsDropDownOpen就像ComboBox一样通过GotFocus和LostFocus事件。

解决方案

来自搜索 wpf gotfocus vs gotkeyboardfocus [ ^ ]:



WPF有两个关于焦点的概念。有物理键盘焦点,并有逻辑焦点。



只有一个元素可以有键盘焦点(如果应用程序不是活动应用程序,没有元素会有键盘焦点)。



多个项目可以有逻辑焦点。


你可以更好地理解wpf中GotFocus和GotKeyboardFocus之间的区别从这里 - ;



UIElement.GotFocus事件(System.Windows) [ ^ ]



在wpf中GotFocus和GotKeyboardFocus之间的区别? [ ^ ]



c# - GotFocus和GotKeyboardFocus之间的区别 [ ^ ]

I want to know that what is the difference between GotFocus and GotKeyboardFocus in wpf?



What I have tried:

I am trying to open and close a Popup by setting a property: IsDropDownOpen just like a ComboBox through the GotFocus and LostFocus events.

解决方案

From the first Google result when searching for "wpf gotfocus vs gotkeyboardfocus[^]":


WPF has 2 concepts regarding focus. There is the physical keyboard focus, and there is logical focus.

Only one element can have keyboard focus (and if the application isn't the active application, no element will have keyboard focus).

Multiple items can have logical focus.


You can better understand difference between GotFocus and GotKeyboardFocus in wpf from here-;

UIElement.GotFocus Event (System.Windows)[^]

The difference between GotFocus and GotKeyboardFocus in wpf?[^]

c# - The difference between GotFocus and GotKeyboardFocus[^]


这篇关于在fpf中,gotfocus和gotkeyboardfocus有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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