How do I exclude items from the codeview dropdown?

T

Tom P.

I am writing a component with several properties and they are really
starting to clog the Members dropdown list in the code view of VS2008.
Is there a way of decorating a member variable or property so that ti
won't show in that dropdown? I can't find the usefull methods anymore
for all the properties in the dropdown.

Thanks in advance.

Tom P.
 
J

Jeff Johnson

I am writing a component with several properties and they are really
starting to clog the Members dropdown list in the code view of VS2008.
Is there a way of decorating a member variable or property so that ti
won't show in that dropdown? I can't find the usefull methods anymore
for all the properties in the dropdown.

I'm pretty sure you can't do what you're looking to do, but I'd be
interested to know if there is actually a way (for curiosity's sake).
 
P

Pavel Minaev

I am writing a component with several properties and they are really
starting to clog the Members dropdown list in the code view of VS2008.
Is there a way of decorating a member variable or property so that ti
won't show in that dropdown? I can't find the usefull methods anymore
for all the properties in the dropdown.

If you mean the "Members" dropdown list in the upper right corner of
the editor, then I don't think you can do that.

If you mean IntelliSense dropdowns, then it's [EditorBrowsable
(EditorBrowsableState.Never)] attribute.
 
I

Ignacio Machin ( .NET/ C# MVP )

As an alternative, rename all the useful properties to start with a
'u', say: uMyProperty etc.  Just type the 'u' and intellisense will
bring up all the useful stuff for you.

rossum

That is the worst advice ever. please nobody follow it.
 
T

Tom P.

I do name member variables to start with an underscore but that only
limits them, not plain named Properties and it still means I have to
sort through the color variables to find the ones I want.

Also, I don't want to have goofy looking public properties just for
the sake of "ease of use".

The thing is, I have several colors the user can define that control
the look and feel. Well, that part is done and I am working on other
parts and no longer have to deal with that stuff.

I was thinking of using the "partial class" trick and separating out
the offending variables. This doesn't get rid of them but does make
them light gray so maybe that's the best I can hope for.

Thanks for the help guys.

Tom P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top