How to set focus for silverlight control in code? For example, I have a user control MyControl, in code, I want to do something like:
MyControl.GetFocus();
but there is no function GetFocus(), only event GotFocus.
How to resolve this issue?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Focus().
http://msdn.microsoft.com/en-us/library/cc903954(v=vs.95).aspx
also look at this question – How Do I Give a Textbox Focus in Silverlight?