//Event for Issue Search TextBox, //Search for the Journal by It's Issue number private void IssueSearch(object sender, TextChangedEventArgs e) { //if the the User inputs is not Positive integer - //don't search, instead clear the TextBox contents if (!Validity.PositiveInteger(txtIssue.Text)) { txtIssue.Text = string.Empty; } //If we in the regular search mode (not multiply) else if (!IsMultiSearch) { dataLib.ItemsSource = mainLibrary.FindJournal(j => j.IssueNumber == int.Parse(txtIssue.Text)); } //if the user deletes the text from issue search box, //Show all the item in the library if (string.IsNullOrWhiteSpace(txtIssue.Text)) { RefreshDataGrid(); } }