This project is read-only.

Add configuration option to treat namespaces at top of file separately.


In a resource dictionary (to give an example), there may be only a very few namespaces. My attribute tolerance is 4, so when I beautify the XAML, it puts all these on one line. Of course, strictly speaking, they are just XML attributes. But, they are typically very long, and when "reading" them, I am most interested in scanning the namespace prefixes on the left, which is impossible once all the namespaces are on a single line.

In general, I think most people are simply accustomed to seeing these on separate lines, and this just looks a little funny. I get an irresistible urge after beautifying a resource dictionary to manually "correct" this, placing the namespaces back on separate lines.

Perhaps you could add a configuration option to always put the namespaces on separate lines, regardless of any other settings for formatting attributes.


JimFoye wrote May 7, 2013 at 7:02 PM

I am thinking in terms of a resource dictionary, but of course for other types of objects there are of course attributes that are not namespaces. Normally, of course, with something like a Window or UserControl, there are enough namespaces and properties set, so they exceed the attribute tolerance anyway.

So, a more precise wording for this option might be something like "Always put attributes of the root object on separate lines, regardless of attribute tolerance".