Click here to Skip to main content
15,790,884 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi all,
I'm having textbox in one window and a button(virtual keyboard) in another window but both window in same solution..how can i set focus on textbox when a button is clicked..clear this issue please..

thanks in advance..
Posted
Updated 23-Aug-11 3:57am
v4
Comments
Philippe Mori 23-Aug-11 8:58am    
Fixed many spelling errors.

1 solution

Focus in WPF is a complex matter. However, a simple myTextBox.Focus() does work.

To delve in the depths of focusing concepts, start here: http://msdn.microsoft.com/en-us/library/aa969768.aspx[^].

—SA
 
Share this answer
 
v2
Comments
Pravin Patil, Mumbai 23-Aug-11 9:42am    
My 5....
Sergey Alexandrovich Kryukov 23-Aug-11 9:44am    
Thank you, Pravin.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900