First, thank you for taking the time to read my question.
I have spent a good amount of time on this issue with no success. I have created a Custom TextBox which inherits from TextBox. The Custom TextBox provides a more advanced suggestion drop-down menu with better filtering. The custom TextBox works beautifully, but I would like to hide the properties related to the original suggestion menu from the Properties Window in Visual Studio:
- AutoCompleteCustomSource
- AutoCompleteMode
- AutoCompleteSource
The code I've developed to try and hide these properties is:
[ReadOnly(true)]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete.", true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
new private AutoCompleteStringCollection AutoCompleteCustomSource { get; set; }
[ReadOnly(true)]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete.", true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
new private AutoCompleteMode AutoCompleteMode { get; set; }
[ReadOnly(true)]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete.", true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
new private AutoCompleteSource AutoCompleteSource { get; set; }
The sources I've used are:
- Making the Visual Studio designer ignore a public property
- Hiding unwanted properties in custom controls
The properties are still being displayed. Please provide a working example or a reference to one.
Thank you again for lending me your time.