ANRTournament.MainWindow.FinalResultsFilter_TextChanged C# (CSharp) Method

FinalResultsFilter_TextChanged() private method

private FinalResultsFilter_TextChanged ( object sender, System e ) : void
sender object
e System
return void
        private void FinalResultsFilter_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
        {
            ListCollectionView view = CollectionViewSource.GetDefaultView(this.dgFinalResults.ItemsSource) as ListCollectionView;
            view.Filter = item =>
            {
                TextBox control = sender as TextBox;
                if (control == null || string.IsNullOrEmpty(control.Text))
                    return true;
                bool show = true;
                FinalResult result = item as FinalResult;
                if (result != null)
                {
                    show = result.Player.Alias.ToLower().Contains(control.Text.ToLower());
                }
                return show;
            };
        }
MainWindow