Indentation - XAML
Does anybody know how to do an auto-indent a XAML file i开发者_JAVA技巧n Visual Studio 2010?
With the document open, press
CONTROL+K CONTROL+D
Menu - Edit:Advanced:Format Document (Your keyboard shortcut will be to the right of the menu item)
I find that if I just close the current object using the auto-complete functionality Visual Studio will indent everything in-between.
So you could just delete the last line of your XAML and then just start retyping the start of the line, hit tab and get your XAML indented.
Or you could just select Edit > Advanced > Format Document.
精彩评论