Geeks With Blogs
Drewby Made from 60% post-consumer recycled fiber.

Jason posted a great episode on our new 10-4 show on Channel9 that covers customizing the Visual Studio 2010 start page. The start page is defined in XAML (Markup language for Windows Presentation Foundation), so adding new tabs, buttons and other functionality is as easy as editing the XAML in Visual Studio or any text editor.

You can do even more than just edit the XAML. Because the start page is using XAML and Windows Presentation Foundation, you can also add your own WPF controls to the mix. Build your WPF control just as you would normally and place the assembly containing the control in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Components. For example, create a build status control that queries your build server for the status of the most recent build:


Watch Jason’s 10-4 episode to learn how to copy the StartPage into your personal documents folder and edit the XAML file. To register your control, place a XAML namespace declaration at the top of the file:

New Picture

Then, add the control to the XAML at the location you want it to appear in the start page. In my case, this is simply adding the tag <my:MyBuildControl /> above the Welcome to Visual Studio 2010 CTP text. The start page will automatically reload in Visual Studio once your save the XAML file.


Now you can add just about any functionality you’d like to make easily available within the Visual Studio start page. I’m really looking forward to the various customizations that developers come up with and share with the community.

One other note: When you copy the StartPage.xaml file into your documents directory, you’ll also notice a C# Project (.csproj) file. If you open the C# project file and then open the StartPage.xaml file from this project, the appropriate references will be set so that the StartPage shows up in the WPF designer. Once you add your custom control to the start page, you’ll need to add an assembly reference to this C# project file in order to continue using the WPF designer. Right click the project, select Add Reference and point it at your assembly in the Components directory I referenced above.

WPF designer

Posted on Monday, December 29, 2008 11:46 PM | Back to top

Copyright © Drew Robbins | Powered by: