Make Visual Studio 2013 use Self-Closing Tags for

2019-07-23 11:26发布

I've just started messing around with WPF, and something I've noticed is that when writing in Visual Studio's XAML editor, tags that I'd like to be formatted as self-closing tags (for example <Setter />) always get auto-completed to have a separate closing tag, like <Setter></Setter>. Is there a way to change this behavior, or am I stuck reformatting those tags by hand?

1条回答
地球回转人心会变
2楼-- · 2019-07-23 12:09

I do not see one in the Visual Studio options but there is one in the Resharper options.

Resharper menu -> Code Editing -> XAML -> Editor -> Check "Always create self-closed tags in code completion"

查看更多
登录 后发表回答