2

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?

KentZhou
  • 24,805
  • 41
  • 134
  • 200

1 Answers1

0

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?

Community
  • 1
  • 1
Dor Cohen
  • 16,769
  • 23
  • 93
  • 161