>Ok, I added this property to my class, except I made it private, and I can still see and set the property in the prop sheet.OK, a couple of things ...
1) It needs to be public, not private ... the "new" means that it's "hiding" the public BorderStyle property in the base Windows.Forms UserControl. By making it private you're not "hiding" the public property.
2) This will not prevent the property from showing up in the Property Sheet for the user control class you've created, but it will prevent it from showing in any sub-class of your user control. You could always make your user control class abstract so that it always needs to be sub-classed.
~~Bonnie
>>
>I'm creating a user control. Is it possible to hide the control's BorderStyle property?>>
>>Kevin, you need to use the [Browsable(false)] attribute. The BorderStyle property is not virtual however, so you'll need to specify it like this:
>>
>>
>>[Browsable(false)]
>>public new BorderStyle BorderStyle
>>{
>> get { return base.BorderStyle; }
>> set { base.BorderStyle = value; }
>>}
>>
>>
>>~~Bonnie
>
>
>Ok, I added this property to my class, except I made it private, and I can still see and set the property in the prop sheet.