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;
};
}