Is there a Visual Studio shortcut for replacing the beginning and ending tag name in XAML/XML/HTML at once?

StackOverflow https://stackoverflow.com/questions/696963

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.

Was it helpful?

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:

  1. Write a macro.
  2. Write an add-on (or customize an existing open-source add-on).
  3. Buy one of mentioned products (CodeRush or Refactor).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top