Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 sort xml/xaml attributes

In Visual Studio 2010 is there an option or does anyone know of a plugin that will allow you to sort your xml/xaml attributes alphabetically?

I would like to be able to hit a hotkey and have this:

<Button
    Grid.Row="1"
    IsEnabled="True"
    IsDefault="True"
    ContentTemplate="{DynamicResource InsertButtonContentTemplate}"
    Click="_insertButton_Click"
    Content="Insert"
    HorizontalAlignment="Right"
    VerticalAlignment="Center"
    Grid.Column="1" />

alphabetize its attributes and turn into this:

<Button
    Click="_insertButton_Click"
    Content="Insert"
    ContentTemplate="{DynamicResource InsertButtonContentTemplate}"
    Grid.Column="1"
    Grid.Row="1"
    HorizontalAlignment="Right"
    IsEnabled="True"
    IsDefault="True"
    VerticalAlignment="Center" />
like image 347
Kevin R Avatar asked Jan 09 '12 23:01

Kevin R


1 Answers

I found this Visual Studio 2010 plugin during my travels. It seems to do pretty much what I was looking for. (The plugin can be found at http://xamlstyler.codeplex.com/)

like image 172
Kevin R Avatar answered Oct 19 '22 02:10

Kevin R