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" />
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/)
您可以使用XAML Markup Attribute Sorter - 对任何格式良好的XML(如XAML和XML文件)的属性进行排序。
链接地址: http://www.djcxy.com/p/10318.html