Пример #1
0
        /// <summary>
        /// Called when filter was applied for the entry.
        /// </summary>
        /// <param name="filter">The filter.</param>
        protected virtual void OnFilterApplied(PropertyFilter filter)
        {
            var handler = FilterApplied;

            if (handler != null)
            {
                handler(this, new PropertyFilterAppliedEventArgs(filter));
            }
        }
        /// <summary>
        /// Applies the filter for the entry.
        /// </summary>
        /// <param name="filter">The filter.</param>
        public override void ApplyFilter(PropertyFilter filter)
        {
            bool propertiesMatch = false;

            foreach (var entry in Properties)
            {
                if (PropertyMatchesFilter(filter, entry))
                {
                    propertiesMatch = true;
                }
            }

            HasVisibleProperties = _properties.Any(IsVisibleProperty);
            MatchesFilter        = propertiesMatch;

            if (propertiesMatch && !IsExpanded)
            {
                IsExpanded = true;
            }

            OnFilterApplied(filter);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyFilterAppliedEventArgs"/> class.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public PropertyFilterAppliedEventArgs(PropertyFilter filter)
 {
     Filter = filter;
 }
 private static bool PropertyMatchesFilter(PropertyFilter filter, PropertyItem entry)
 {
     entry.ApplyFilter(filter);
     return(entry.MatchesFilter);
 }
 /// <summary>
 /// Applies the filter for the entry.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public override void ApplyFilter(PropertyFilter filter)
 {
     this.MatchesFilter = (filter == null) || filter.Match(this);
     this.OnFilterApplied(filter);
 }
Пример #6
0
 /// <summary>
 /// Applies the filter for the entry.
 /// </summary>
 /// <param name="filter">The filter.</param>
 public abstract void ApplyFilter(PropertyFilter filter);