private void OnFilterApplied(PropertyFilter filter) { if (this.FilterApplied != null) { this.FilterApplied(this, new PropertyFilterAppliedEventArgs(filter)); } }
// TODO: Optimize performance public override void ApplyFilter(PropertyFilter filter) { foreach (PropertyItem property in properties) { if (PropertyMatchesFilter(filter, property)) { foreach (FrameworkElement element in Children) { if (!object.Equals(element.Tag, property.Name)) { continue; } element.Visibility = Visibility.Visible; } continue; } foreach (FrameworkElement element in Children) { if (!object.Equals(element.Tag, property.Name)) { continue; } element.Visibility = Visibility.Collapsed; } } }
// TODO: Optimize performance public override void ApplyFilter(PropertyFilter filter) { foreach (PropertyItem property in properties) { if (PropertyMatchesFilter(filter, property)) { foreach (FrameworkElement element in Children) { if (!object.Equals(element.Tag, property.Name)) continue; element.Visibility = Visibility.Visible; } continue; } foreach (FrameworkElement element in Children) { if (!object.Equals(element.Tag, property.Name)) continue; element.Visibility = Visibility.Collapsed; } } }
public void ApplyFilter(PropertyFilter filter) { this.MatchesFilter = (filter == null) || filter.Match(this); this.OnFilterApplied(filter); }
public override void ApplyFilter(PropertyFilter filter) { //throw new NotImplementedException(); }
private bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry) { entry.ApplyFilter(filter); return(entry.MatchesFilter); }
public abstract void ApplyFilter(PropertyFilter filter);
private bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry) { entry.ApplyFilter(filter); return entry.MatchesFilter; }