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.
当 TextBox 的输入范围设置为搜索并按下箭头时,我们如何获取生成的事件?
1.有一个事件OnKeyDown,您可以在其中检查按下了什么键
textBox.OnKeyDown += (s, e) => { if (e.Key == Key.Enter) { // perform search e.Handler = true; } }
2.ScrollViewer 自动滚动到焦点文本框,我猜...