UIElement.PredictFocus(FocusNavigationDirection) 方法

定義

在衍生類別中覆寫時,傳回會針對指定之焦點周遊方向接收焦點的項目,而不用實際將焦點移至該項目。When overridden in a derived class, returns the element that would receive focus for a specified focus traversal direction, without actually moving focus to that element.

public:
 virtual System::Windows::DependencyObject ^ PredictFocus(System::Windows::Input::FocusNavigationDirection direction);
public virtual System.Windows.DependencyObject PredictFocus (System.Windows.Input.FocusNavigationDirection direction);
abstract member PredictFocus : System.Windows.Input.FocusNavigationDirection -> System.Windows.DependencyObject
override this.PredictFocus : System.Windows.Input.FocusNavigationDirection -> System.Windows.DependencyObject
Public Overridable Function PredictFocus (direction As FocusNavigationDirection) As DependencyObject

參數

direction
FocusNavigationDirection

要求的焦點周遊方向。The direction of the requested focus traversal.

傳回

DependencyObject

如果實際上有叫用 MoveFocus(TraversalRequest),就會取得焦點的項目。The element that would have received focus if MoveFocus(TraversalRequest) were actually invoked.

備註

這個類別中此方法的預設執行不完整,而且一律會傳回 nullThe default implementation of this method in this class is incomplete, and always returns null.

適用於

另請參閱