private void UrlTextBox_OnPreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { e.Handled = true; Navigate(UrlTextBox.Text); } }