How to hide a object's inherited properties ?

  • Thread starter Thread starter Guest
  • Start date Start date
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 ?
 
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.
 
Back
Top