Adding WPF Controls to the Visual Studio 2010 Start Page

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:

MyControlLibrary

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.

StartPage

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

New Video Podcast Called 10-4

Our team just launched a new video podcast called 10-4 that will cover the new features in Visual Studio 2010 and the .NET Framework 4.0.

Episode 1: Downloading and Using the Visual Studio 2010 September CTP

For this first episode of 10-4, we’ll look at how to download and use the Virtual PC image of the Visual Studio 2010 September CTP. We’ll give you tips on how to download this massive (7GB+ compressed) VPC, show you how to get past some pesky expiration issues, and get you started with the CTP walkthroughs. Lastly we’ll cover where to get assistance and provide your feedback about this release.

In future episodes we’ll dive more deeply into the technical underpinnings of Visual Studio 2010 and the .NET Framework 4.0, but for this first episode we wanted to make sure everybody could get the CTP and follow along at home.

If you have ideas for the show or topics that you want covered, please let us know! We’ll be releasing one episode a week. You can provide your feedback in the comments of the show or email us at 10-4 at microsoft.com.

How to keep evaluating the Visual Studio 2010 CTP

If you’ve used the Visual Studio 2010 CTP VPC over the last several days, you probably have noticed the warnings about the end of the evaluation period. However, there is a very easy workaround so that you can continue to use the VPC and evaluate this preview of Visual Studio 2010 and the .NET Framework 4.0.

Virtual PC allows you to disable the synchronization between the clock in your virtual machine and the clock on your hardware machine. Once the synchronization is disabled, the clock will only tick forward when the VPC is running. This gives you 2 months of total evaluation time for the VPC.

Jeff Beehler does a great job of describing how to do this in his blog post. Make sure you do this with a newly decompressed VHD image so you can maximize the amount of time you have to evaluate the software.

Also, there are other activation messages that you will run into. Brian Keller has a great blog post describing these messages and what you can do about them.