ElementHost.Select(Boolean, Boolean) 方法

定義

啟動裝載的項目。Activates the hosted element.

protected:
 override void Select(bool directed, bool forward);
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 以指定要選取控制項的方向,否則為 falsetrue to specify the direction of the control to select; otherwise, false.

forward
Boolean

true 會在定位順序中向前移動。false 會在定位順序中向後移動。true to move forward in the tab order; false to move backward in the tab order.

備註

方法會啟動 Select 主控的元素。The Select method activates the hosted element. 如果有多個裝載的元素,則會根據和參數啟動第一個或最後一個元素 directed forwardIf more than one hosted element exists, either the first or last element is activated, depending on the directed and forward parameters.

方法的重複呼叫 Select 不會跨越裝載的元素。Repeated calls to the Select method do not traverse the hosted elements. 若要選取後續的元素,請 MoveFocus 在屬性上呼叫方法 HostContainerTo select subsequent elements, call the MoveFocus method on the HostContainer property.

這個執行會將 tab 鍵從 Windows Forms 轉送至 Windows Presentation Foundation (WPF) 。This implementation forwards tab keys from Windows Forms to Windows Presentation Foundation (WPF).

適用於

另請參閱