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.

适用于

另请参阅