private void CategoriesListBox_OnPreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { e.Handled = true; var selected = CategoriesListBox.SelectedItem as SelectCategory; if (selected == null) return; NavigationCommands.GoToPage.Execute(GetPageAddress(selected), (IInputElement)sender); } }