ContentElement.MoveFocus(TraversalRequest) 方法

定義

嘗試將焦點從這個項目移至另一個項目。Attempts to move focus from this element to another element. 移動焦點的方向是由指引方向所指定,該指引方向是在這個項目之視覺化父代的組織內解譯。The direction to move focus is specified by a guidance direction, which is interpreted within the organization of the visual parent for this element.

public:
 virtual bool MoveFocus(System::Windows::Input::TraversalRequest ^ request);
public virtual bool MoveFocus (System.Windows.Input.TraversalRequest request);
abstract member MoveFocus : System.Windows.Input.TraversalRequest -> bool
override this.MoveFocus : System.Windows.Input.TraversalRequest -> bool
Public Overridable Function MoveFocus (request As TraversalRequest) As Boolean

參數

request
TraversalRequest

包含屬性的周遊要求,該屬性指出在現有定位順序中周遊的模式,或以視覺化方式移動的方向。A traversal request, which contains a property that indicates either a mode to traverse in existing tab order, or a direction to move visually.

傳回

如果已執行要求的周遊則為 true,否則為 falsetrue if the requested traversal was performed; otherwise, false.

備註

請確定您檢查此方法的傳回值。Make sure you check the return value of this method. 如果在控制項的組合所定義的索引標籤停止中執行,而且遍歷要求並未要求換行,則可能會傳回 false 的傳回值。A return value of false might be returned if the traversal runs into a tab stop that is defined by a control's composition, and the traversal request did not request to wrap.

適用於

另請參閱