Hi,
I have a multiline textbox. When ever a user press the "Enter" key this textbox will focus. But the focus is in second line first position and not in the first line first position. And one more thing i have given "AcceptReturn=True" in xaml file for this textbox. Please help.
Thanks,
Vijay
How to set focus to a multi line textbox in silverlight 4
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Priya LingeRank #785 · 2.9K reputationPosted Dec 5, 2011, 12:45 AM EST
Hi,
Please check this.
I have two textboxes in my application as follow,
On txtfirst key down event i will focus txtsecond.
private void txtfrist_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key.Equals(Key.Enter))
{
txtsecond.Focus();
}
}
Focus will go to txtsecond textbox on secondline firstposition.
Thanks.
vijay rags58 reputationPosted Dec 5, 2011, 2:45 AM EST