Ejemplo n.º 1
0
        public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
        {
            if (listAccessors == null || listAccessors.Length == 0)
            {
                return(new PropertyDescriptorCollection(ItemProperties.ToArray()));
            }
            var propertyDescriptor = listAccessors[listAccessors.Length - 1];
            var collectionInfo     = ViewInfo.DataSchema.GetCollectionInfo(propertyDescriptor.PropertyType);

            if (collectionInfo != null)
            {
                return(new PropertyDescriptorCollection(ViewInfo.DataSchema.GetPropertyDescriptors(collectionInfo.ElementType).ToArray()));
            }
            return(new PropertyDescriptorCollection(ViewInfo.DataSchema.GetPropertyDescriptors(propertyDescriptor.PropertyType).ToArray()));
        }