dotnet windows forms designtime:
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]
[quoted text, click to view] "daniel" wrote:
> Hi all,
>
> I created a new control derived from UserControl class. For this new control
> I added some new properties. How can I show only these new properties for
> this control at design time in PropertyGrid control?
>
> Thanks,
> Dan
>
>
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
[quoted text, click to view] "David Husselmann" <davidh-mscommunityforums@tamix.com> wrote in message
news:7775D1D4-75B0-4CA1-A770-D2F6D96023F5@microsoft.com...
> 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]
>
> "daniel" wrote:
>
>> Hi all,
>>
>> I created a new control derived from UserControl class. For this new
>> control
>> I added some new properties. How can I show only these new properties for
>> this control at design time in PropertyGrid control?
>>
>> Thanks,
>> Dan
>>
>>
>>
Hi all,
I created a new control derived from UserControl class. For this new control
I added some new properties. How can I show only these new properties for
this control at design time in PropertyGrid control?
Thanks,
Dan
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
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).
[quoted text, click to view] "V" <vaibhav.gadodia@gmail.com> wrote in message
news:1148377806.119346.288390@g10g2000cwb.googlegroups.com...
>I looked it up and the attribute that you can add to the Overriding
> properties in the derived class would be [Browsable(false)]
>
> - Vaibhav
>