Customizing Start Page in Visual Studio 2010

Update: With the Beta Release, the tray and tray group Items referred in this post are removed. Check out here for the updated information.

By now, most of you would be aware that the upcoming Visual Studio 2010 editor is being rebuilt in WPF. The text size in the Editor can be altered by the scroll of Mouse wheel. The Start Page being a XAML page, is completely customizable for the end-developer.

Channel 9 episode series shows an overview of how Start Page can be customized. In this blog post, we will look into Customization of Start Page in VS2010 editor. If you have tried the CTP bits of VS2010, you can see the following Start Page. 

Few of things to observer here are: As you hover over the different sections, you can notice a little Animation. The project section gives options to see the recent projects, to create a new project or to open an existing project.

The Visual Studio section, gives options to link to MSDN library, MSDN forums, Community and also to add an extensibility plug in.

The Start page comes from a XAML file located in the following path:

Open the XAML file. It contains a Grid with 3 rows and 3 columns and notice the "VS:Tray" present at (1,1). The VS Tray contains 3 Tray items corresponding to three different sections in Start Page – Welcome, Projects and Visual Studio.

Each Tray Item contains a list of TrayGroupItems which are being displayed when a Tray Item is chosen – Consider the analogy of list of items displayed in a screen when a Menu item is chosen. The TrayGroupItems for Welcome Tray are Welcome, CTP Walkthrough and Feedback. Compare this with the Start Page screen shown above.

A TrayGroupItem node contains the content that needs to be shown when a TrayGroupItem is chosen. A "Welcome" TrayGroupItem contains the Paragraph text and Caption to be shown in the screen. Observe that the caption "Welcome to the Visual Studio 2010" in StartPage screen is shown from the caption in the XAML document under this Welcome TraneGroupItem.

Let us now extend the Start page by adding our own section as a new Tray Item at (2,1).  Add a new folder called "StartPages" in "Visual Studio 2010" folder under Documents in User Settings.

Let us copy the StartPage.csproj and StartPage.xaml into this new folder. Now we can edit the StartPage.xaml to add our customization to StartPage.

Let us add a custom Favorite link. Similar to MSDN forums TrayGroupItem shown below, we will include the blog link in the Static resource and reference it in our custom section in CommandParameter.

Here I have added "My Favorites" TrayItem and included a "My blog" TrayGroupItem, pointing to my blog.

 

Now close the Visual Studio and reopen it. Observe that a new section called "My Favorites" is added.

Clicking on My Favorites will open up my customized Items on the screen. Observe that the item "My blog" has been added.

 

This is just a Kick-Start in Start Page Customization. Sky is the limit for beautifying the Start Page with our own XAML sections. We can include any kind of Animation or even add a small application in the Start Page.

Are you out ready to quench your thirst by creating your own custom section in Start Page of Visual Studio 2010. Download the CTP and try experimenting!!!

Happy Coding!!!