public ObjectContainerHelperBase(IPropertyContainer propertyContainer)
     : base(propertyContainer)
 {
     _propertyItemCollection = new PropertyItemCollection(new ObservableCollection <PropertyItem>());
     UpdateFilter();
     UpdateCategorization(false);
 }
        private void UpdateFilter()
        {
            FilterInfo filterInfo = PropertyContainer.FilterInfo;

            PropertyItems.FilterPredicate = filterInfo.Predicate
                                            ?? PropertyItemCollection.CreateFilter(filterInfo.InputString);
        }
 private void UpdateCategorization(bool updateSubPropertiesCategorization)
 {
     _propertyItemCollection.UpdateCategorization(this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized);
     if (updateSubPropertiesCategorization && (_propertyItemCollection.Count > 0))
     {
         foreach (PropertyItem propertyItem in _propertyItemCollection)
         {
             PropertyItemCollection subPropertyItemsCollection = propertyItem.Properties as PropertyItemCollection;
             if (subPropertyItemsCollection != null)
             {
                 subPropertyItemsCollection.UpdateCategorization(this.ComputeCategoryGroupDescription(), this.PropertyContainer.IsCategorized);
             }
         }
     }
 }
Beispiel #4
0
        public void Filter(string text)
        {
            Predicate <object> filter = PropertyItemCollection.CreateFilter(text);

            GetDefaultView().Filter = filter;
        }