system.componentmodel

Inherited Control Visible/Enabled Property Value Always True: PropertyGrid

I have created a custom WinForms hosting environment. Which has a toolbox and a PropertyGrid. The controls displayed in the Toolbox are inherited from existing WinForm controls. DropDownList Source: public interface IPropertyFilter : ICustomTypeDescriptor { PropertyDescriptorCollection FilterProperties(PropertyDescriptorCollection...

Enumerate Form Controls

I have this C# code to enumerate controls of a Form instance: private void button1_Click(object sender, EventArgs e) { textBox1.Text = ""; Form2 form2 = new Form2(); foreach (Control control in form2.Controls) { PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(control); ...