Hi all
I'm developing a control, and I need to hide some properties to the
user. For example, suppose I need Text property to be completely
inacessible (from a Form/Code that is into another project/assembly).
I tried with attributes:
<Browsable(Fals e), _
EditorBrowsable (EditorBrowsabl eState.Never), _
RefreshProperti es(RefreshPrope rties.Repaint), _
Description("Ge ts or sets the control's Text value.")_
Public Shadows Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
If MyBase.Text <Value Then
MyBase.Text = Value
End If
End Set
End Property
but I discovered that Text property is invisible by the property
browser, but it is still accessible through IntelliSense.
Then, I tried associating a designer:
Protected Overrides Sub PostFilterPrope rties(ByVal properties As
IDictionary)
properties.Remo ve("Text")
MyBase.PostFilt erProperties(pr operties)
End Sub
but, again, the Text property is accessible by IntelliSense.
What's wrong?
Thank you.
Dom
I'm developing a control, and I need to hide some properties to the
user. For example, suppose I need Text property to be completely
inacessible (from a Form/Code that is into another project/assembly).
I tried with attributes:
<Browsable(Fals e), _
EditorBrowsable (EditorBrowsabl eState.Never), _
RefreshProperti es(RefreshPrope rties.Repaint), _
Description("Ge ts or sets the control's Text value.")_
Public Shadows Property Text() As String
Get
Return MyBase.Text
End Get
Set(ByVal Value As String)
If MyBase.Text <Value Then
MyBase.Text = Value
End If
End Set
End Property
but I discovered that Text property is invisible by the property
browser, but it is still accessible through IntelliSense.
Then, I tried associating a designer:
Protected Overrides Sub PostFilterPrope rties(ByVal properties As
IDictionary)
properties.Remo ve("Text")
MyBase.PostFilt erProperties(pr operties)
End Sub
but, again, the Text property is accessible by IntelliSense.
What's wrong?
Thank you.
Dom
Comment