I've gotten to do more XAML lately and wanted to get rid of XamlStyler (which was more of a legacy thing from a time when CRR didn't have XAML formatting), but I noticed some inconsistencies and things that I couldn't really change (or didn't work as I expected them).
One thing that is kind of neat, but at the same time inconsistent (or surprising if you like) is the fact that CRR seems to insert empty lines at the first child level:
XAML<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="525"
Height="350">
<Window.Resources>
<DataTemplate DataType="String" />
</Window.Resources>
<Grid>
<StackPanel>
<StackPanel.Resources>
<DataTemplate DataType="String" />
</StackPanel.Resources>
<TextBlock />
<TextBlock />
<TextBlock />
</StackPanel>
<Label />
<Label />
<Label />
</Grid>
</Window>
The empty lines before/after Window.Resources and Grid were added by CRR, but they do not apply to levels deeper down (I would've expected the same thing to happen for StackPanel.Resources for example). And at the same time, I cannot tell CRR to not do it.
So, the least I'd like to see here is a switch to enable/disable this behavior (because I do like it in general, but I'd find it hard to define a rule set of where I'd want them or not; for example it would be nice to have an empty line between Grid.Row entries but not between members of the same Grid.Row but different Grid.Column; only have it between elements and not at the beginning/end; etc.)
The other thing is that CRR doesn't seem to properly sort attached property attributes in a custom namespace, even though my configuration appears to be correct-ish.
TBF I just copy-pasted my old settings from XamlStyler, and it includes two rules that might match (one is star-colon-star *:* which should sort all custom namespace attributes first; followed by star * to sort all non-namespace attributes afterwards):
XAML<Label Grid.Row="2"
Grid.Column="1"
local:Test.PropertyB="2"
Content="Text"
local:Test.PropertyA="1"/>
But instead, the namespace attributes are left as-is without any sorting. In fact, all attributes are left as-is as soon as namespace attributes are present; no sorting happens there.