Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why EditorBrowsable doesn't work?

Tags:

c#

winforms

I tried to hide inherited property in intellisense with EditorBrowsable (as said here Hiding user control properties from IntelliSense), when testing in client form though I can still see it why ?

[ Category("Main"), Description("Text"), Obsolete("Don't use this"), Browsable(false), EditorBrowsable(EditorBrowsableState.Never) ] public override String Text {     get { return null; } } 
like image 997
user310291 Avatar asked Dec 14 '10 16:12

user310291


1 Answers

Are you using ReSharper? It seems like ReSharper doesn't obey the EditorBrowsable attribute.
If I turn off ReSharper, I don't see my property. If I turn ReSharper on, it does show.

In ReSharper Options, go to Environment | IntelliSense | Completion Appearance and check "Filter members by [EditorBrowsable] attribute".

You still have to reference the assembly though, it doesn't work within a solution if you reference your usercontrol's project.

like image 75
comecme Avatar answered Oct 01 '22 06:10

comecme