FocusManager.SetIsFocusScope(DependencyObject, Boolean) 메서드

정의

지정된 DependencyObject를 포커스 범위로 설정합니다.

public:
 static void SetIsFocusScope(System::Windows::DependencyObject ^ element, bool value);
public static void SetIsFocusScope (System.Windows.DependencyObject element, bool value);
static member SetIsFocusScope : System.Windows.DependencyObject * bool -> unit
Public Shared Sub SetIsFocusScope (element As DependencyObject, value As Boolean)

매개 변수

element
DependencyObject

포커스 범위를 만들 요소입니다.

value
Boolean

element가 포커스 범위이면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 를 사용하여 SetIsFocusScope요소를 포커스 scope 만듭니다.

StackPanel focuseScope2 = new StackPanel();
FocusManager.SetIsFocusScope(focuseScope2, true);
Dim focuseScope2 As New StackPanel()
FocusManager.SetIsFocusScope(focuseScope2, True)

설명

포커스 범위는 범위 내에서 FocusManager.FocusedElement를 추적하는 컨테이너 요소입니다. 기본적으로 Window 클래스는 , ContextMenuToolBar 클래스와 마찬가지로 Menuscope 포커스입니다. 포커스 scope 요소가 로 설정true되었습니다IsFocusScope.

포커스, 키보드 포커스 및 논리적 포커스에 대한 자세한 내용은 입력 개요를 참조하세요.

적용 대상