Set the Browsable attribute on the new property that hides the existing one. Here is a code snippet that hides the WordWrap property in the derived TextBox.
[C#]
public class MyTextBox : TextBox
{
[Browsable(false)]
public new bool WordWrap
{
get{ return false;} //always false
set{}
}
}
[VB.NET]
Public Class MyTextBox
Inherits TextBox
_
Public Shadows Property WordWrap() As Boolean
Get
Return False ’always false
End Get
Set ’empty
End Set
End Property
End Class ’MyTextBox
Share with