Groups | Blog | Home
all groups > dotnet windows forms designtime > november 2004 >

dotnet windows forms designtime : Properties of Component in PropertyGrid



Matthias Pieroth
11/19/2004 8:00:42 PM
Hi NG,

I built a GUI-Builder with C# and use own components like TableRow-Object as
designed-time-components which are derived from Panel. Just like in other
IDEs I show the Properties of a TableRow-Object in a Property-Grid. The
TableRow has the interface ILayoutComponent, an interface I defined. My
problem is: I see all Properties of the Panel-class in the Property-Grid,
but I only want to see the Properties which I defined in my
ILayoutComponent-interface. Is it possible to hide the Properties of the
base class and only show the Properties of the derived class or the inerface
which is implemented?

Thanx in advance

Matthias

joeycalisay
11/22/2004 9:19:15 AM
If you want it to be hidden from the PropertyGrid but still use it in
editor, you have to implement ICustomTypeDescriptor. If you want to totally
remove the said properties, you have to attach a custom designer
implementing your own PreFilterProperties/PostFilterProperties method.

try this link:

http://www.awprofessional.com/articles/printerfriendly.asp?p=169528

[quoted text, click to view]

AddThis Social Bookmark Button