Friday, December 28, 2012

Tip 5.38: You can customize both your Object pane and Members pane in the Object Browser

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog


Over the next several tips, we're going to take apart the Object Browser Settings menu that lists what appears in the Object Browser.

VSTip5380

The first set of options control your view preference in the Object pane, which is either by namespace or by containers. Think of these two options as a set of radio buttons that are mutually exclusive. The rest of the options are more like check boxes, since you can have all the show options enabled. If you choose View Namespaces (which is the default), all components are shown based on their namespace, just as you would expect. The idea here is that namespaces stored in multiple physical containers are merged, as shown here:

VSTip5380a

Now if you switch to View Containers, you'll see the physical containers, and then a breakdown of the namespaces that are contained in each.

VSTip5380b

Sara Aside

She always uses View Containers so that she doesn't feel so overwhelmed by seeing everything! =)

Happy Programming! =)
Posted by Nils-Holger at 12:49 PM with 452 comments.

Thursday, December 27, 2012

Tip 5.37: You can create a keyboard shortcut for adding references to a solution from the Object Browser

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog


Sara Aside

She was kind of surprised to see it in the list of commands. But, then again, one can never have too many keyboard shortcuts. =) To write this tip, she bound it to her pseudo random keyboard shortcut Ctrl+Alt+Shift+T. This is her generic, all-purpose keyboard shortcut that she uses for testing purposes.

As far as binding View.ObjectBrowserAddReference to a keyboard shortcut goes, she'll leave it up to you to decide how useful this is. Maybe the "keyboard shortcut for everything" users will enjoy it. As long as some object has selection—meaning it doesn't have to have focus (blue highlight) and has at least inactive selection (light gray highlight)—in the Objects pane (the leftmost pane), you'll get the following message box when you press the keyboard shortcut.

VSTip5370

And if there's nothing selected (meaning you probably have absolutely nothing in the Object Browser) and you press the keyboard shortcut, Visual Studio will just stare at you.
Happy Programming! =)
Posted by Nils-Holger at 2:28 PM with 7908 comments.

Wednesday, December 26, 2012

Tip 5.36: How to use navigate forward and back in the Object Browser

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog


Another set of buttons on the Object Browser toolbar belongs to the Navigate Forward and Navigate Back actions.

VSTip5360

The pages you visit within the Object Browser are saved in MRU (most-recently used) order. This alone is somewhat exciting, but what really makes it exciting is a keyboard shortcut! The commands are View.ObjectBrowserForward and View.ObjectBrowserBack. If you are using the Visual Basic Development Settings, you'll see that the keyboard shortcuts are Alt+Minus for Back and Shift+Alt+Minus for Forward. If you use the Forward and Back functionality frequently and are not using the Visual Basic Settings, go to Tools–Options–Environment–Keyboard, and manually set the keyboard shortcuts there. Happy Programming! =)
Posted by Nils-Holger at 1:16 PM with 675 comments.