<p>Visual Studio 2008's XAML editor (SP1) cannot reformat the XML into a consistent style.</p>

<p>Which tools can I use to get a nicely formatted XAML file? Studio integration preferred.</p>

[{'answer_id': 47688, 'author': 'David Schmitt', 'author_id': 4918, 'author_profile': 'https://Stackoverflow.com/users/4918', 'pm_score': 1, 'selected': False, 'text': '<p>The only tool I found is <a href="http://www.kaxaml.com/" rel="nofollow noreferrer">Kaxaml</a>, which does nice formatting ("XAML Scrubber" entry in the left menu), but being a stand-alone editor doesn\'t quite make the cut.</p>\n'}, {'answer_id': 47714, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 2, 'selected': False, 'text': '<p>Have you tried <kbd>CTRL</kbd> + <kbd>K</kbd> , <kbd>D</kbd>?!</p>\n'}, {'answer_id': 47784, 'author': 'David Schmitt', 'author_id': 4918, 'author_profile': 'https://Stackoverflow.com/users/4918', 'pm_score': 3, 'selected': False, 'text': '<p>While browsing through the options, I found that I had to set "Position each attribute on a separate line" and "Position first attribute on same line as start tag" under "Tools > Options ... > Text-Editor > XAML > Formatting > Spacing" and reset the Keyboard mappings under "Tools > Options ... > Environment > Keyboard" to "Visual C# 2005".</p>\n\n<p>Now the XAML editor reformats the XAML to my taste when pressing <kbd>Ctrl</kbd>+<kbd>E</kbd>, <kbd>D</kbd>.</p>\n'}, {'answer_id': 62668, 'author': 'Brownie', 'author_id': 6600, 'author_profile': 'https://Stackoverflow.com/users/6600', 'pm_score': 1, 'selected': False, 'text': '<p><a href="http://www.dimebrain.com/2008/05/automating-read.html" rel="nofollow noreferrer">http://www.dimebrain.com/2008/05/automating-read.html</a> is a nice plugin for formatting your xaml so the attributes line up underneath each other.</p>\n'}, {'answer_id': 68212, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>Here\'s a link that is specific to VS2008 XAML formatting but the good news is you can do it directly inside VS.</p>\n<p><a href="https://web.archive.org/web/20210116172353/http://geekswithblogs.net/lbugnion/archive/2007/09/29/cleaning-up-xaml-code-and-improving-parsing-time-with-blend.aspx" rel="nofollow noreferrer">Link</a></p>\n'}, {'answer_id': 70510, 'author': 'rudigrobler', 'author_id': 5147, 'author_profile': 'https://Stackoverflow.com/users/5147', 'pm_score': 2, 'selected': False, 'text': '<p>Karl just released v2 of his XAML Power toys and it can reformat your xaml from VS2008! Check out the video about XAML Power Toys Accessories</p>\n\n<p><a href="http://karlshifflett.wordpress.com/2008/09/16/xaml-power-toys-v2-release-finally-code-name-hawaii/" rel="nofollow noreferrer">http://karlshifflett.wordpress.com/2008/09/16/xaml-power-toys-v2-release-finally-code-name-hawaii/</a></p>\n'}, {'answer_id': 3911461, 'author': 'chris', 'author_id': 472881, 'author_profile': 'https://Stackoverflow.com/users/472881', 'pm_score': 2, 'selected': False, 'text': '<p>Or try xaml styler hosted at <a href="http://xamlstyler.codeplex.com/" rel="nofollow">http://xamlstyler.codeplex.com/</a> for visual studio 2010.\nIf you ever used Kaxaml\'s Xaml Scrubber and you like it, then you could think of this extension is the "Xaml Scrubber" for Visual Studio.</p>\n\n<p>Check <a href="http://xamlstyler.codeplex.com/" rel="nofollow">http://xamlstyler.codeplex.com/</a> for feature highlights.</p>\n'}, {'answer_id': 14249352, 'author': 'Bruno', 'author_id': 1196270, 'author_profile': 'https://Stackoverflow.com/users/1196270', 'pm_score': 0, 'selected': False, 'text': '<p>I just did a post on this. This is a very versatile way to format XAML.</p>\n\n<p><a href="http://blogs.msdn.com/b/brunoterkaly/archive/2013/01/09/how-to-format-xaml-easily-and-effectively-windows-8-wpf-silverlight.aspx" rel="nofollow">http://blogs.msdn.com/b/brunoterkaly/archive/2013/01/09/how-to-format-xaml-easily-and-effectively-windows-8-wpf-silverlight.aspx</a></p>\n'}]
['https://Stackoverflow.com/questions/47685', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4918/']