BaconographyWP8Core.View.SearchView.manualBox_KeyDown C# (CSharp) Method

manualBox_KeyDown() private method

private manualBox_KeyDown ( object sender, System e ) : void
sender object
e System
return void
        private void manualBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        {
            if (e.Key == System.Windows.Input.Key.Enter)
            {
                this.Focus();
            }
            else
            {
                BindingExpression bindingExpression = ((TextBox)sender).GetBindingExpression(TextBox.TextProperty);
                if (bindingExpression != null)
                {
                    bindingExpression.UpdateSource();
                }
            }
        }