How to hide a object's inherited properties ?

G

Guest

I create a user control object and show its properties through a propertygrid
object in my application. It is sure that there are 100 hundred of properties
inherited from System.Windows.Forms.UserControl and they are all showed on
the propertygrid. Is there a way i can hide all these inherited properties
and show only my user control's properties ?
 
G

Guest

What I would do is create a inner-class in the inherited class that holds all
the data. This way you have complete control of what properties are shown.
Use something like myProp.SelectedObject = this.Data where Data is a
reference to the inner-class.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top