Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Navigate with Enter key instead of using Tab key RSS

2 replies

Last post Aug 04, 2009 09:50 AM by plavsickiDeran

(0)
  • plavsickiDeran

    plavsickiDeran

    Member

    2 Points

    13 Posts

    Navigate with Enter key instead of using Tab key

    Aug 03, 2009 08:13 AM | LINK

     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!

  • amyo

    amyo

    Star

    8312 Points

    1083 Posts

    Re: Navigate with Enter key instead of using Tab key

    Aug 03, 2009 05:43 PM | LINK

    Check this post : http://silverlight.net/forums/t/53738.aspx

    Hope this helps.

    amyo Enter key tabulation Controlol focus

  • plavsickiDeran

    plavsickiDeran

    Member

    2 Points

    13 Posts

    Re: Navigate with Enter key instead of using Tab key

    Aug 04, 2009 09:50 AM | LINK

     Thanks a lot. 

    Very, very helpful.