UIElement.PredictFocus(FocusNavigationDirection) 方法

定义

当在派生类中重写时,返回将按指定焦点遍历方向接收焦点的元素,而不用实际将焦点移至该元素。

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

请求的焦点遍历的方向。

返回

DependencyObject

如果实际调用了 MoveFocus(TraversalRequest),则为接收焦点的元素。

注解

此类中此方法的默认实现不完整,并且始终返回 null

适用于

另请参阅