Hide an inherited property
-
I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao
-
I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao
It's my understanding that your can't hide it from Intellisense because you would have to remove the property in order to do that. Since your inheriting that property from another class, you can't block it. Since the parent class made the property public, you can't change that... I could be wrong so if anyone would like to correct me, please, feel free! :) RageInTheMachine9532
-
It's my understanding that your can't hide it from Intellisense because you would have to remove the property in order to do that. Since your inheriting that property from another class, you can't block it. Since the parent class made the property public, you can't change that... I could be wrong so if anyone would like to correct me, please, feel free! :) RageInTheMachine9532
-
I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao
rochester_tw wrote: DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property It didn't hit me until this morning, but you made you Shadowed property Public. Change it to Private and it might solve your problem. RageInTheMachine9532
-
rochester_tw wrote: DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property It didn't hit me until this morning, but you made you Shadowed property Public. Change it to Private and it might solve your problem. RageInTheMachine9532
I tried it. It actually got more confusion. The property is still available in Intellisense, it calls something that I can't even tell. I assume it calls the property in the parent class, but it doesn't seem to change the behavior of the control. Thanks for try. Tao