Beispiel #1
0
 private void ProcessSelectedObject(Object selectedObject)
 {
     listProperties = new PropertyDescriptionList();
     categories     = new CategoryList();
     foreach (PropertyDescriptor propDesc in TypeDescriptor.GetProperties(selectedObject))
     {
         if (propDesc.IsBrowsable)
         {
             if (!categories.ContainsKey(propDesc.Category))
             {
                 categories[propDesc.Category] = new Category(propDesc.Category);
             }
             Category            thisCategory    = categories[propDesc.Category];
             PropertyDescription wrappedProperty = new PropertyDescription(propDesc, _selectedObject, thisCategory);
             thisCategory.AddProperty(wrappedProperty);
             listProperties.Add(wrappedProperty);
         }
     }
     listProperties.Sort(PropertyDescriptionSorter);
 }