In your designer class, have a look at overriding the PreFilterProperties
method. This allows you to remove properties from the property grid.
[code]
protected override void
PreFilterProperties(System.Collections.IDictionary properties) {
base.PreFilterProperties(properties);
properties.Remove("AccessibleDescription");
properties.Remove("AccessibleName");
properties.Remove("AccessibleRole");
}
[/code]
> Hi all,
>
[quoted text clipped - 4 lines]
> Thanks,
> Dan
Carlo (mcp) - 23 May 2006 10:12 GMT
Hi
this is good for classes that has a visual design-mode interface. They must
have a Designer attribute. But what's about a class that does NOT has
Designer attribute?
.c.
-------------------------------------------
Carlo, MCP (Windows Based Applications)
carlodevREMOVE@gmail.com
> In your designer class, have a look at overriding the PreFilterProperties
> method. This allows you to remove properties from the property grid.
[quoted text clipped - 19 lines]
>> Thanks,
>> Dan
V - 23 May 2006 10:48 GMT
Hi Carlo, I am not sure if this will work, but you could override all
the base class properties in your derived class and attach the
attribute which makes them invisible in the Property Grid.
- Vaibhav
V - 23 May 2006 10:50 GMT
I looked it up and the attribute that you can add to the Overriding
properties in the derived class would be [Browsable(false)]
- Vaibhav
Dei - 23 May 2006 11:57 GMT
My control inherited some properties like Location, Size. How can I override
these properties in my derived class?
I removed "Location" properties for my control by overiding
PreFilterProperties function but in this case I'm not able to move my
control using. All the time the location will be (0, 0).
>I looked it up and the attribute that you can add to the Overriding
> properties in the derived class would be [Browsable(false)]
>
> - Vaibhav
DEI - 23 May 2006 14:34 GMT
Do you have any ideea how to hide "Location" propertie. (how to set
Browsable(false) for it) ?
Thanks,
Daniel
>I looked it up and the attribute that you can add to the Overriding
> properties in the derived class would be [Browsable(false)]
>
> - Vaibhav