FrameworkContentElement.PredictFocus(FocusNavigationDirection) FrameworkContentElement.PredictFocus(FocusNavigationDirection) FrameworkContentElement.PredictFocus(FocusNavigationDirection) FrameworkContentElement.PredictFocus(FocusNavigationDirection) Method

Definición

Determina el elemento siguiente que recibiría el foco relativo a este elemento para una dirección de movimiento de foco proporcionada, pero realmente no mueve el foco.Determines the next element that would receive focus relative to this element for a provided focus movement direction, but does not actually move the focus. Este método está sellado y no se puede invalidar.This method is sealed and cannot be overridden.

public:
 override System::Windows::DependencyObject ^ PredictFocus(System::Windows::Input::FocusNavigationDirection direction);
public override sealed System.Windows.DependencyObject PredictFocus (System.Windows.Input.FocusNavigationDirection direction);
override this.PredictFocus : System.Windows.Input.FocusNavigationDirection -> System.Windows.DependencyObject
Public Overrides NotOverridable Function PredictFocus (direction As FocusNavigationDirection) As DependencyObject

Parámetros

direction
FocusNavigationDirection FocusNavigationDirection FocusNavigationDirection FocusNavigationDirection

Dirección para la que se debe determinar un cambio de foco probable.The direction for which a prospective focus change should be determined.

Devoluciones

Elemento siguiente al que el foco se movería si se atravesara el foco realmente.The next element that focus would move to if focus were actually traversed. Puede devolver null si el foco no se puede mover en relación con este elemento para la dirección proporcionada.May return null if focus cannot be moved relative to this element for the provided direction.

Excepciones

Especificó una de las direcciones siguientes en TraversalRequest: Next, Previous, First, Last.Specified one of the following directions in the TraversalRequest: Next, Previous, First, Last. Estas direcciones no son válidas para PredictFocus(FocusNavigationDirection) (pero son válidas para MoveFocus(TraversalRequest)).These directions are not legal for PredictFocus(FocusNavigationDirection) (but they are legal for MoveFocus(TraversalRequest)).

Comentarios

MoveFocus es el método relacionado que realmente mueve el foco.MoveFocus is the related method that actually does move focus.

Se aplica a