System.ComponentModel.TypeConverter.GetProperties C# (CSharp) Method

GetProperties() public method

public GetProperties ( ITypeDescriptorContext context, object value ) : PropertyDescriptorCollection
context ITypeDescriptorContext
value object
return PropertyDescriptorCollection
        public PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value) {
            return GetProperties(context, value, new Attribute[] {BrowsableAttribute.Yes});
        }  
        

Same methods

TypeConverter::GetProperties ( ITypeDescriptorContext context, object value, Attribute attributes ) : PropertyDescriptorCollection
TypeConverter::GetProperties ( object value ) : PropertyDescriptorCollection

Usage Example

Example #1
0
         public static PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, Attribute[] attributes, object component, TypeConverter converter)
        {
            if (component == null) return null;

            if (component is ICustomTypeDescriptor)
            {
                ICustomTypeDescriptor descriptor = (ICustomTypeDescriptor)component;
                if (attributes != null)
                    return descriptor.GetProperties(attributes);
                return descriptor.GetProperties();
            }

            // Note that this assumes that converter supports GetProperties!
            if (converter != null)
            {
                return converter.GetProperties(context, component, attributes);
            }

            Type type = component.GetType();
            
            if (attributes != null)
                return TypeDescriptor.GetProperties(component, attributes);

            return TypeDescriptor.GetProperties(component);
        }
All Usage Examples Of System.ComponentModel.TypeConverter::GetProperties