AutomationPeer.HasKeyboardFocus 方法

定义

获取一个值,该值指示与此自动化同级关联的元素当前是否具有键盘焦点。

public:
 virtual bool HasKeyboardFocus() = HasKeyboardFocus;
bool HasKeyboardFocus();
public bool HasKeyboardFocus();
function hasKeyboardFocus()
Public Function HasKeyboardFocus () As Boolean

返回

Boolean

bool

如果元素具有键盘焦点,则为 true;否则为 false

适用于