private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e) { _updateTimer.Stop(); if (e.Key == Key.Enter) { ((AbstractEntityCollectionViewModelBase)DataContext).RefreshItems(); FilterTextBox.SelectAll(); } else if (e.Key == Key.Down) { MainGrid.BackgroundFocus(); } else { _beforeText = FilterTextBox.Text; _updateTimer.Start(); } }