D
Dom
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(False), _
EditorBrowsable(EditorBrowsableState.Never), _
RefreshProperties(RefreshProperties.Repaint), _
Description("Gets 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 PostFilterProperties(ByVal properties As
IDictionary)
properties.Remove("Text")
MyBase.PostFilterProperties(properties)
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(False), _
EditorBrowsable(EditorBrowsableState.Never), _
RefreshProperties(RefreshProperties.Repaint), _
Description("Gets 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 PostFilterProperties(ByVal properties As
IDictionary)
properties.Remove("Text")
MyBase.PostFilterProperties(properties)
End Sub
but, again, the Text property is accessible by IntelliSense.
What's wrong?
Thank you.
Dom