Is there a Visual Studio shortcut for replacing the beginning and ending tag name in XAML/XML/HTML at once?
-
22-08-2019 - |
Question
I want something similar to this post but with Visual Studio. This would be very helpful when editing XAML, XML, or HTML.
For instance:
<StackPanel>
<Button>I'm A Button</Button>
</StackPanel>
If I start changing the 'StackPanel' tag, I want to automatically change the end tag to match (say if I switch it to a 'Grid' instead). I figure I could write a macro to do it, but I want to use a native approach first if available.
Solution
CodeRush and Refactor pro from devexpress will do this for you as well as a ton of other cool stuff. It is a paid for product though I'm afraid - I am not aware of anything free that does this.
OTHER TIPS
I'm afraid you'll have to either:
- Write a macro.
- Write an add-on (or customize an existing open-source add-on).
- Buy one of mentioned products (CodeRush or Refactor).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow