none
Navigate with Enter key instead of using Tab key

    Question

  •  Hello,

    I am creating custom TextBox control in Silverlight Class Library. How can I find next control on page and set the focus programmaticaly?

    There is no chance to set e.Key or e.PlatformKeyCode with Tab key code(because e.Key property is read only) or find next control within already defined tab order on my page( like in Windows Desktop Application). For example:

    void txtBox_KeyDown(object sender, KeyEventArgs e)
            {
                if (e.Key == Key.Enter)

                {

                   e.Key= Key.Tab;

                   // or use something like GetNextControl from Windows Desktop Application Programming in C# and set focus to that Control

                }
            }

    P.S

    My English is very, very bad!

    Monday, August 03, 2009 4:13 AM

Answers

All replies