Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Next); MoveFocus(request);
我在 DataGrid PreviewKeyDown 事件中使用此代码,并且焦点没有移动到下一个控件,而是它的焦点转到了 DataGrid 之前的两个控件。
使用此代码请求:
TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Down);
使用Down请求希望有帮助