Friday, July 11, 2008

[Silverlight, C#] TextBox Fuuuuuuuuun!

So this afternoon I dove into the wonderful world of TextBoxes, as I now wanted to add the ability for people to add text to my WYSIWYG drag/drop app. And boy oh boy does this look fun [*rollseyes*]. Tabstops and focus issues oh my!

Giving Focus to a TextBox Programatically

While I thought this was as easy as calling the Focus() function, but as it turns out, you also have to make sure that the IsTabStop property is true as well.
this.mytextbox.IsTabStop = true;
this.mytextbox.Focus();

Focus Puts the Caret in the TextBox, but Keystrokes are not captured
/shrug

No comments: