Tools\addin's for formating or cleaning up xaml?
Posted
by cody
on Stack Overflow
See other posts from Stack Overflow
or by cody
Published on 2010-05-12T20:28:34Z
Indexed on
2010/05/12
20:34 UTC
Read the original article
Hit count: 284
I'm guessing these don't exist since I searched around for these but I'm looking for a few tools:
1) A tool that cleans up my xaml so that the properties of elements are consistent through a file. I think enforcing that consistence would make the xaml easier to read. Maybe there could be a hierarchy of what comes first but if not alphabetical might work.
Example before:
TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"
TextBox Grid.Column="1" Margin="4" Name="t2" Grid.Row="3"
Example after:
TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"
TextBox Name="t2" Grid.Row="3" Grid.Column="1" Margin="4"
(note < /> has been remove from the above since control seem to have issues parsing whe the after section was added)
2) Along the same lines as above, to increase readability, a tool to align properties, so from the above code example similar props would start in the same place.
<TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"/>
<TextBox Name="t2" Grid.Row="3" Grid.Column="1" Margin="4"/>
I know VS has default settings for XAML documents so props can be on one line or separate lines so maybe if there was a tool as described in (1) this would not be needed...but it would still be nice if you like your props all on one line.
3) A tool that adds X to the any of the Grid.Row values and Y to any of the Grid.Column values in the selected text. Every time I add a new row\column I have to go manually fix these. From my understanding Expression Blend can help with this but seem excessive to open Blend just to increment some numbers (and just don't grok Blend). Maybe vs2010 with the designer will help but right now I'm on VS08 and Silverlight.
Any one know of any tools to help with this?
Anyone planning to write something like this...I'm looking at you JetBrains and\or DevExpress.
Thanks.
© Stack Overflow or respective owner