XamlStyler
XamlStyler copied to clipboard
Is it possible to disable Attribute Formatting only?
I only need the features exclude the Attribute Formatting. In other words, I want to keep attributes format by manual.
Are you looking to just have reordering? If so, then it is hard to leave formatting untouched, since when we parse and rearrange the XAML for reordering, we break down the XAML into tokens that need to be reconstructed following some ruleset. The attribute formatting settings allow for a pretty broad range of configurations, so it is likely you can accomplish what you are looking for if you are following common XAML patterns/best practices.
Got it, it seems impossible to only reordering.
And how about this? In the follow, the DataContext="{Binding AboutViewModel}" auto wrap by VS, how to configure styler only make attributes to new line when it auto wrap by VS (No matter how many attributes/characters per line)? The existing formatting options seems hard to implements.
So I want:
Before formatting

After formatting

This is also tricky, because the width of your window in Visual Studio can change pretty dramatically based on window size, monitor resolution, scaling, etc. We have previously considered an option for column limit (#12), but ultimately declined that as well, since that pattern does not lend itself well to markup languages like XAML.