ASP.NET 3.5-Related Visual Studio 2008 Enhancements (continued)
file that contains a single function. You can optionally include comments that will provide a richer IntelliSense experience when the function is referenced:
/// <summary>This returns a person's age in dog years</summary>
/// <param name="Age">Person's Age</param>
var DogYears = Age * 7
file into the <HEAD>
tag and IntelliSense picks up on the functions contained in the external library (see Figure 20
), external code files (.js
), and in your master pages (.master
) (see Figure 21
CSS Properties Window
The first of the new CSS features added to Visual Studio 2008 that I will cover is the CSS Properties window. You will find it about half-way down the View menu. The CSS Properties window shows you all the CSS settings currently being applied to any ASP.NET server control or HTML element (see Figure 24
). A red line displayed through the property name indicates that it has been overridden. Overridden style properties are not applied to the selected element. Click the Summary button to display all the properties that are applied to the selected element (see Figure 25
). As you can see, the new CSS Properties window makes keeping track and changing CSS values quick and easy.
Manage Styles Window
|Figure 24. CSS Properties Window: The CSS Properties window displays all the CSS properties for the selected item.||
|Figure 25. CSS Properties Summary: The CSS Properties Summary provides a list of properties that are applied to the selected element.||
|Figure 26. Manage Styles Window: The Manage Styles window displays all the styles in a CSS file and indicates which elements are in use.|
The Manage Styles window is a welcome addition to Visual Studio 2008. It helps you visually manage the CSS styles used on the page you are currently working with in both Design and Source view (see Figure 26
). You will find it on the View menu, just after the CSS Properties menu option. When an item is circled it means that rule is currently used somewhere on the current page. Hover over a style to display the rule values for that rule. Select a rule and you'll see a preview of its appearance in the Selected Style Preview section at the bottom of the Manage Styles window. Double-click on a rule to open the style sheet in which it resides. Start making changes and you'll see another feature of Visual Studio 2008—full IntelliSense within your style sheets.
At the top of the Manage Styles window you'll see an option to create new styles and an option to load an additional style sheet into the Manage Styles window if your project utilizes more than a single style sheet. You can click the Options button to display a number of display options (see Figure 27
|Figure 27. CSS Options: The Options button provides categorizing and display options for the CSS elements.|
You can find videos regarding ASP.NET 3.5 and Visual Studio 2008
on the Microsoft ASP.NET Web site.