Focusable=true
및 IsTabStop=true
의 사용자 정의 컨트롤이 있습니다.WPF - 뒤에 코드에서 usercontrol을 집중하는 방법
Tab 키를 사용하여 초점을 맞출 수 있습니다. 코드에서 집중해야합니다.
나는 uc.Focus()
과 Keyboard.Focus(uc)
을 시도했지만 작동하지 않습니다. FocusManager.SetFocusedElement
FocusManager.SetFocusedElement(parentElement, uc);
다른 컨트롤이 포커스를 두 번째로 'UserControl'에서 훔치는 것일 수 있습니다. –