private void AutoSuggestBox_KeyUp(object sender, KeyRoutedEventArgs e) { var autoSuggestBox = sender as AutoSuggestBox; if (e.Key == Windows.System.VirtualKey.Enter || autoSuggestBox.Text.Length == 0) { viewModel.FilterEntries(); } }