XAML Auto-Formatting in VS2010

by vyurtyn 23. September 2011 18:37

Remember those days when your HTML code was auto-formatted in early versions of Visual Studio? While I don’t miss this feature (who does? Smile) there is an auto-format option for XAML in Visual Studio 2010 I usually turn on as it improves readability of XAML.

The option is somewhat hidden in configuration of VS2010: select Tools >> Options >> Text Editor >> XAML >> Formatting >> Spacing >> and check “Position each attribute on a separate line”.

Now compare Snapshot A below showing default XAML code in VS 2010 editor (see how you have to scroll back and forth to make any sense of XAML) with the Snapshot B showing the formatted version of the same XAML.

Snapshot A: Default Formatting of XAML
Snapshot A

Snapshot B: Formatted XAML
 Snapshot B

To format a section of XAML just select it and either use the hot-keys “CTRL-E, F” or select Edit >> Advanced >> Format Selection in the Menu.

 

Say goodbye to TFS 2008

by jhagal 15. April 2011 17:53
"But wait," I hear you say, "Visual Studio 2008 is still necessary for some types of development." 
 First step, assuming you haven't already, which you probably have, install Visual Studio 2008 Team Explorer, then, and this is vital, reinstall the VS2008 SP1. Again, you've probably already done this. After that install the Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 which allows you to connect to TFS 2010. But you're not done yet.
 When you try to add the server, it'll complain because you have to add http://[servername]:8080/tfs/collection to the Servers list in TFS. And when you try that, it says, no. Something, something, no slashes, something. Anyway, long story short, no. However, you CAN add the server more directly, via regedt32! Edit your registry, and go to
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers
From here, you can add a string value that is your tfs server, something like http://[servername]:8080/tfs/

So, to sum up the six easy steps are:

  1. Check to see if you've already got Visual Studio 2008 Team Explorer - if you do skip to step 4.
  2. Install Visual Studio 2008 Team Explorer
  3. Install/Reinstall Visual Studio 2008 SP1
  4. Install VSTS2008SP1FCUTFS2010
  5. Add servers via Registry
  6. Say hello to the future - flying cars and TFS 2010.

Back to Basics in Visual Studio 2010

by johnb 10. March 2011 17:32

Have you ever wondered what those icons are on the top right of the toolbar? Don’t be afraid. Go ahead and click and see what happens. 

  

These icon’s are very helpful. For instance if you accidentally closed out “Solution Explorer” one of these icons can help you open it back up. To find out which one, point your cursor on top of the icon’s and wait a second. A help dialogue box pops up that states what the icon is. Plus it will give you short cut keys. 

 

Pretty cool, huh? After experimenting with the icons, now you can layout your custom workspace to maximize the efficiency of development work. 

 

Tag cloud