Allow Single-Line Nested Elements when Reformatting XAML
When Visual Studio 2015 reformats my XAML (which I do not want to have happen without my permission), the part that bothers me the most is when nested elements are split into multiple lines. For example, I may have something like:
and it gets reformatted to:
This changes this section of my code from 1 line to 7 lines. Even things as small as nesting just 1 level can significantly lengthen your code, not to mention make it much uglier. I would like reformatting to have the option of preserving single-line nesting rather than putting every element on a separate line.
Thank you for the feedback on this item. Can you identify specific scenarios where you would like to see single line formatting to be preserved.
Program Manager, Visual Studio
This happens many times in VS. Essentially, XML/HTML/XAML based elements are reformatted without regard to their content. XAML will be reformatted to have adjacent controls on a window on many extra lines in the XAML file.
This makes comparing one control to another much harder. Consider a dialog with 4 text boxes next to one another with only the background color different between them. One would like to vertically scan the XAML settings for each text box one setting at a time to see that they are all the same except for the background color.
This happens in .NET C# .config files, xaml, html, ...