Saturday, May 17, 2014

Autoformatting XAML the hard way

Iris Classon mentioned about a “hidden” feature of Visual Studio which can be used to autoformat XAML here. I think it’s a good option but it’s too simple because sometime you want to have more control on formatting option (order, indent…). In this post I introduce another hard way to do autoformatting XAML.

"XAML Styler" is a Visual Studio extension, which makes XAML markup source code beautify much easier by sorting the attributes based on their importance. This tool can help you/your team maintain a better XAML coding style as well as a much better XAML readability.

You can get XAML Styler from here

You can configure XAML Styler to sort attributes in the way you want, fix whitespace between <Run/>, indent XAML markup based on Visual Studio settings and many more. And you can even format XAML without using yet another shortcut key, Ctrl + S to save file also does formatting for you. For more details on features, you can find out here.

No comments:

Post a Comment