Does anybody know how to do an auto-indent a XAML file in 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With