简体   繁体   English

消除焦点并集中精力于控件

[英]Removing focus and gaining focus on a control

I want to remove focus from an item in a ListBox when clicking on a button, then give focus to an item in an other ListBox. 我想在单击按钮时从ListBox的项目中删除焦点,然后将焦点赋予另一个ListBox中的项目。 Is there something to remove focus? 有什么可以消除焦点的东西吗? And how can I give focus to an other ListBox again, or even better, its' selected item? 我又该如何再次将焦点放在另一个ListBox上,或者甚至更好地集中在另一个ListBox的选定项目上?

I have tried to use the SelectionChanged property but the focus is all off when moving items in List's around. 我尝试使用SelectionChanged属性,但是在List周围移动项目时焦点全部关闭。

This would be a really good place to start. 这将是一个非常不错的起点。 Head down to the Focus Section of the page. 转到页面的“焦点”部分。 http://msdn.microsoft.com/en-us/library/ms754010.aspx#focus http://msdn.microsoft.com/zh-CN/library/ms754010.aspx#focus

The logical focus is probably what you care about 逻辑重点可能是您关心的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM