Tips and Tricks in a world of Mix

Posts tagged ‘beautify’

Silverlight–Formatting Xaml – beautify

1. In VS2008 or VS2010 go to Tools –> Options

2. Expand Text Editor -> XAML -> Formatting –> Spacing

image

 

image

 

 

3. Under "Attribute Spacing" check "Position each attribute on separate line".

4. If you prefer, you can also put the first attribute on the same line as the tag by checking the box.  I use this setting because it isn’t offensive and still saves a little space.

image

Now, whenever you edit XAML in Visual Studio, press "Ctrl+K+D" and Visual Studio will reformat the XAML as desired.

image

if you check

Position first attribute on same line as start tag it’ll look like this :

image

I think that I preffer the second option.

Tag Cloud

%d bloggers like this: