I am working on some xaml that is cluttered. The Label's have their own name
and TabIndex
, which are both unnecessary in my situation. Take the following example Label element,
<Label Canvas.Left="20" Canvas.Top="40" x:Name="Page2Label15" Width="40" TabIndex="40">Great Label</Label>
How can I use Visual Studio 2012 (or another xaml editor) to remove the unwanted name
and TabIndex
attributes without targeting false positives? By false positives, I mean something like the below that I need to preserve.
<TextBox Canvas.Left="20" Canvas.Top="40" x:Name="Page2Textbox15" Width="70" TabIndex="40">Great Label</TextBox>
It seems like this should be possible, because the VS 2012 Find and Replace allows for the use of regular expressions. I have had trouble getting the look around regular expressions to work correctly.
I would like the end result to be:
<Label Canvas.Left="20" Canvas.Top="40" Width="40">Great Label</Label>