#336 – Intellisense Shows Fonts Available on Development System

When you use the XAML editor in Visual Studio 2010 to enter a value for the FontFamily property, Intellisense in the editor will show you a list of fonts available on the development system.  In the example below, the dropdown shows the Parsons font as a possible font choice, since it has been installed on the development system.

This font will appear correctly when the application is run on the development system, but will get displayed on a target system only if it is also installed on that system.  If the font is not present, some other font will be substituted.

#295 – Blend Provides Intellisense

Expression Blend 4 provides Intellisense in its code editor in the same way that Visual Studio 2010 does.  It offers suggestions for next elements that make sense in the current context.  Intellisense in Blend is a little less rich than the version in Visual Studio, offering suggestions a little less frequently.  But it does suggest available methods and properties for objects.

Blend also provides Intellisense in its XAML editor, suggesting elements and attributes.  Notice that it provides a little more information than Intellisense in Visual Studio, when editing XAML.

Unfortunately, Blend’s version of Intellisense will not suggest events for XAML elements.  Within the context of an element, only its properties are listed.  You’re better off adding events using the property pane in Blend, or using Visual Studio 2010 to add event handlers.  The version of Intellisense in Visual Studio 2010 does suggest events.

#294 – Intellisense Is Also Available in the XAML Editor

In Visual Studio, Intellisense works in not only the code editor, but also the XAML editor.  As you being typing an element name, for example, Intellisense will display a window listing possible elements.

If you press TAB while an element is highlighted, Intellisense will insert the entire element name into the XAML.

As you continue typing, Intellisense will display a list of possible attributes that are appropriate for the current element.

Again, you can press TAB to insert the complete attribute name.  Intellisense will also add an equals (=) sign and a pair of quotation (“) marks.

Intellisense is also available when entering binding expressions.

#293 – Intellisense Will Show Overloaded Methods

Intellisense in Visual Studio presents you with a list of possible methods that you can call, based on what you’ve already typed.  If there are overloaded methods available in the current context, it will let you cycle through a list of the methods.  Overloaded methods are methods that have the same name, but a different argument list and/or return type.

In the example below, there are three different methods named Bark in the Dog class.  After you’ve entered the full method name and the opening parenthesis, Intellisense displays information about the first of the three methods.  The first overload of Bark takes a single int parameter.

If you press the down arrow key, or click on the downward facing arrow icon, Intellisense shows you the second of the three methods.

You can press the down arrow key again to see the third overload.

#292 – Intellisense Includes Information About a Method’s Parameters

Intellisense will display not only a list of methods that match what you’ve already typed, but will also show you information about the method’s parameters.

Assume that you begin entering the name of a method in the Dog class.  Intellisense shows you information about the  method.

If you now press the Tab key, Visual Studio will fill in the complete method name.

If you now enter an opening parenthesis, Intellisense will list the name of the Bark method again, with the first parameter in bold and a description of the first parameter.  (The method and parameter information will only be displayed if the class has defined the appropriate XML Documentation elements).

At this point, you can enter a value for the first parameter and then enter a comma.  Intellisense displays information about the second parameter.

#291 – Intellisense Lists Available Methods and Properties

When you type a period (.) after a variable that is a reference-typed variable, Intellisense in Visual Studio will display a list of relevant class members.

In the example below, the variable d is an instance of the Dog class.  When you enter a period (.) after the variable name, Intellisense displays a list of the members of the Dog class.  This includes both methods and properties.

You can use the arrow keys to select a specific class member.  As each class member is highlighted, information about the method or property is display to the right.

#290 – Using Intellisense in Visual Studio

Intellisense in Visual Studio is a feature that provides a list of suggested code elements that you might want to enter next, based on what you’ve already typed.

As you start typing, Intellisense will suggest  both language elements and types that match what you’ve already entered.

In the example below, I’ve entered the letter ‘w’ and Intellisense suggests some possible elements that begin with ‘w’ that I might want to enter.

If I’m actually entering a while statement, I can use the down arrow key to highlight while in the list and then press TAB.  Intellisense fills in the rest of the while keyword for me.

If I press TAB a second time, Visual Studio will actually generate a code snippet that is a template for the entire while statement.

Also notice that when Intellisense suggests a class name, it provides general information about the class.