TraversalRequest 클래스

정의

다른 컨트롤로 포커스를 이동할 요청을 나타냅니다.

public ref class TraversalRequest
[System.Serializable]
public class TraversalRequest
public class TraversalRequest
[<System.Serializable>]
type TraversalRequest = class
type TraversalRequest = class
Public Class TraversalRequest
상속
TraversalRequest
특성

예제

다음 예에서는 TraversalRequest 에 대 한 입력으로 인스턴스를 FrameworkElement.MoveFocus 호출 합니다.

// Creating a FocusNavigationDirection object and setting it to a
// local field that contains the direction selected.
FocusNavigationDirection focusDirection = _focusMoveValue;

// MoveFocus takes a TraveralReqest as its argument.
TraversalRequest request = new TraversalRequest(focusDirection);

// Gets the element with keyboard focus.
UIElement elementWithFocus = Keyboard.FocusedElement as UIElement;

// Change keyboard focus.
if (elementWithFocus != null)
{
    elementWithFocus.MoveFocus(request);
}
' Creating a FocusNavigationDirection object and setting it to a
' local field that contains the direction selected.
Dim focusDirection As FocusNavigationDirection = _focusMoveValue

' MoveFocus takes a TraveralReqest as its argument.
Dim request As New TraversalRequest(focusDirection)

' Gets the element with keyboard focus.
Dim elementWithFocus As UIElement = TryCast(Keyboard.FocusedElement, UIElement)

' Change keyboard focus.
If elementWithFocus IsNot Nothing Then
    elementWithFocus.MoveFocus(request)
End If

설명

이 클래스에 대 한 입력된 매개 변수로 사용 되는 UIElement.MoveFocus 메서드. MoveFocus 메서드가 더 실용적 구현을 제공 하는 WPF 프레임 워크 수준 재정의 (FrameworkElement.MoveFocus)에 대 한 병렬 구현 뿐만 아니라 ContentElementFrameworkContentElement합니다. 일반적으로에 속성을 설정 합니다 TraversalRequest 다른 요소로 포커스를 이동할 수는 요청 하는 경우 포커스 동작을 사용자 지정 하기 위해.

이 클래스는 또한 다음 메서드에 대 한 입력된 매개 변수로 사용 됩니다.

생성자

TraversalRequest(FocusNavigationDirection)

TraversalRequest 클래스의 새 인스턴스를 초기화합니다.

속성

FocusNavigationDirection

이동 방향을 가져옵니다.

Wrapped

포커스 이동이 포커스를 가질 수 있는 마지막 자식 요소에 도달했는지 여부를 나타내는 값을 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보