ElementHost.Select(Boolean, Boolean) 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
激活承载的元素。
protected:
override void Select(bool directed, bool forward);
C#
protected override void Select(bool directed, bool forward);
override this.Select : bool * bool -> unit
Protected Overrides Sub Select (directed As Boolean, forward As Boolean)
- directed
- Boolean
如果指定要选择的控件的方向,则为 true
;否则为 false
。
- forward
- Boolean
如果为 true
则在 Tab 键顺序中前移;如果为 false
则在 Tab 键顺序中后移。
方法 Select 激活托管元素。 如果存在多个托管元素,则会激活第一个或最后一个元素,具体取决于 directed
和 forward
参数。
对 方法的 Select 重复调用不会遍历托管元素。 若要选择后续元素,请 MoveFocus 对 HostContainer 属性调用 方法。
此实现将选项卡键从Windows 窗体转发到Windows Presentation Foundation (WPF) 。
产品 | 版本 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |