Geeks With Blogs

News




View Tarun Arora's profile on LinkedIn

profile for Tarun Arora at Stack Overflow, Q&A for professional and enthusiast programmers

Tarun Arora - Visual Studio ALM MVP ALM, Agile, Automation, Performance Testing, Software QA, Cloud, ...

 

The Team Project Picker in TFS 2011 looks gorgeous. I specially like the status bar on the working state, at least let’s you know that the project picker is still working on getting the details and of course the new icons for team project collection and team projects are stunning too.

clip_image001  clip_image002

 

How do I get the Team Project Picker using the TFS API?

That is fairly straight forward. Add a reference to the Microsoft.TeamFoundation.Client dll available in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0 and use the below code,

public void ConnectToTfs()
        {
            TeamProjectPicker tfsPP = new TeamProjectPicker(TeamProjectPickerMode.MultiProject, false, new UICredentialsProvider());
            tfsPP.ShowDialog();
        }

 

Download a sample application here

Why does my project picker look different?

You might run into an issue, where the project picker looks like the below,

clip_image001[1] clip_image002[1]

When the Team Project Picker is run from inside of VS the colour theme will be picked up from VS itself. When running outside of VS the windows theme colours are used, so there can be differences between the two. Currently there isn’t a way to change that since the dialog itself is not public (just the wrapper that launches the dialog). So don’t be surprised if the Team Project Picker looks different then expected :-]

Posted on Wednesday, April 11, 2012 11:49 PM TFS API | Back to top


Comments on this post: TFS API The All New Team Project Picker – Beautiful!

comments powered by Disqus

Copyright © Tarun Arora [Microsoft MVP] | Powered by: GeeksWithBlogs.net