private void OnFilteringItem(ItemFilteringEventArgs e) { if (FilteringItem != null) { FilteringItem(this, e); } }
void _searchBox_TextChanged(object sender, EventArgs e) { if (_searchBox.Text.Length == 0) { this.Items.EndFilter(); } else { this._items.Filter(o => { ItemFilteringEventArgs args = new ItemFilteringEventArgs(o, _searchBox.Text); OnFilteringItem(args); return(!args.ShouldBeRemoved); }); } }
private void OnFilteringItem(ItemFilteringEventArgs e) { if (FilteringItem != null) FilteringItem(this, e); }
void _searchBox_TextChanged(object sender, EventArgs e) { if (_searchBox.Text.Length == 0) { this.Items.EndFilter(); } else { this._items.Filter(o => { ItemFilteringEventArgs args = new ItemFilteringEventArgs(o, _searchBox.Text); OnFilteringItem(args); return !args.ShouldBeRemoved; }); } }