views:

419

answers:

5

What is the best way to display the Members in the current file in VS2008?

SCENARIO: You open a file with ctrl + d and then type “>of ” and SomeFilename, then press enter and you end up in the newly opened file. Now if you don’t remember a method’s name or a member’s name, you might try to incrementally search (ctrl+i) and/or various search options, but what I want to know is how can I see/open/scroll-through/etc the Member combo box (or similar alternative).

Any ideas?

EDIT: I know about the Navigation Bar (it is “on” by default for c#), and that’s exactly what I want to do, go there without using the mouse. There’s a keyboard shortcut: Window.MovetoNavigationBar which is so far the only option i’ve found. But you need to press “Tab” to move from types to Members.

+1  A: 

Use the navigation bar at the top of the IDE - the one on the right hand side lists all members of the current type.

If you don't see the navigation bar then you can enable it this way:

Tools > Options > Text Editor > All Languages > Navigation Bar

Andrew Hare
I have the navigation bar, that’s the two combo boxes, Types on the left, Members on the right. I want to know how to go there **without** using the mouse.
Martín Marconcini
+2  A: 

Andrew is right.

Alternatively, there is Object Browser. Ctrl + Alt + J

EDIT: The shortcut is Ctrl + F2 .
And, you will have to hold it together for little more than a second to reach the dropdown.

You can press Alt + DownArrow to drop the combobox.
While you are in the "Types" dropdown, you can press Tab to move to the "Members" dropdown.

shahkalpesh
Object browser is very ineffective, I’m already in the file, i want to find a method or member contrary to browsing the entire .NET (which would work, but it’s not what I’m looking for.
Martín Marconcini
yes, the behavior is weird. I guess that it’s either reshaper or cumberstone VS option. :S Thanks.
Martín Marconcini
A: 

I think that the only way to see is to map the Window.MovetoNavigationBar, you still have to press tab to pass from Types to Members, and down arrow key to see the list, there’s no incremental search (only the first char). I was hoping there was a better way to do this.

Martín Marconcini
Ctrl + F2 seems to be the shortcut. But it is not working consistently.
shahkalpesh
+1  A: 

Buy ReSharper and use its File Structure window. Ctrl+F11

TrueWill
A: 

For navigation I recommend using DPack . It provides quick navigation to members in code editor, as well navigation to files and class declarations.

Of course ReSharper provides these featuresand much more, but DPack is free and quite lightweight.

http://www.usysware.com/dpack/

Andrii V