In software development it’s typically the way that data entry screens handle the Return or Enter key as a Tab.

It seems this functionality is missing from the current Silverlight 2.0 controls.

I had to roll my own implementation quickly this morning, although it’s probably not the best, it does work :)

    public partial class fieldText : UserControl
    {
        public fieldText ()
        {
            InitializeComponent();
        }

        public event KeyEventHandler OnEnter; 

        public string Text
        {
            get
            {
                return content.Text;
            }

            set
            {
                content.Text = value;
            }
        }

        private void content_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                OnEnter(sender, e);
            }
        }
    }

Obviously, I go on to use the OnEnter handler in my actual page to relocate the user’s focus – note that I am using my own custom control that has a TextBox within it, which is why I had to expose the event.