简体   繁体   中英

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. Is there something to remove focus? And how can I give focus to an other ListBox again, or even better, its' selected item?

I have tried to use the SelectionChanged property but the focus is all off when moving items in List's around.

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

The logical focus is probably what you care about

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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