From be0fbc0e3687ce3c6ec7c23d7f133314ded79f2c Mon Sep 17 00:00:00 2001 From: xiaoy312 Date: Thu, 25 May 2023 11:26:08 -0400 Subject: [PATCH 1/2] chore: add base XamlStyler settings --- Settings.XamlStyler | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Settings.XamlStyler diff --git a/Settings.XamlStyler b/Settings.XamlStyler new file mode 100644 index 000000000..bde267ab2 --- /dev/null +++ b/Settings.XamlStyler @@ -0,0 +1,42 @@ +{ + "AttributesTolerance": 2, + "KeepFirstAttributeOnSameLine": false, + "MaxAttributeCharactersPerLine": 0, + "MaxAttributesPerLine": 1, + "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter", + "SeparateByGroups": false, + "AttributeIndentation": 0, + "AttributeIndentationStyle": 1, + "RemoveDesignTimeReferences": false, + "IgnoreDesignTimeReferencePrefix": false, + "EnableAttributeReordering": true, + "AttributeOrderingRuleGroups": [ + "x:Class", + "xmlns, xmlns:x", + "xmlns:*", + "x:Key, Key, x:Name, Name, x:Uid, Uid, Title", + "Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom", + "Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight", + "Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex", + "*:*, *", + "PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint", + "mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText", + "Storyboard.*, From, To, Duration" + ], + "FirstLineAttributes": "", + "OrderAttributesByName": true, + "PutEndingBracketOnNewLine": false, + "RemoveEndingTagOfEmptyElement": true, + "SpaceBeforeClosingSlash": true, + "RootElementLineBreakRule": 0, + "ReorderVSM": 2, + "ReorderGridChildren": false, + "ReorderCanvasChildren": false, + "ReorderSetters": 0, + "FormatMarkupExtension": true, + "NoNewLineMarkupExtensions": "x:Bind, Binding", + "ThicknessSeparator": 2, + "ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", + "FormatOnSave": true, + "CommentPadding": 2, +} \ No newline at end of file From f3a9d15575f365f65bb66610dd07d3748fdff6f3 Mon Sep 17 00:00:00 2001 From: xiaoy312 Date: Thu, 25 May 2023 11:52:57 -0400 Subject: [PATCH 2/2] style: adjust XamlStyler settings --- Settings.XamlStyler | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Settings.XamlStyler b/Settings.XamlStyler index bde267ab2..3d76cddc6 100644 --- a/Settings.XamlStyler +++ b/Settings.XamlStyler @@ -1,15 +1,15 @@ { - "AttributesTolerance": 2, - "KeepFirstAttributeOnSameLine": false, + "AttributesTolerance": 1, + "KeepFirstAttributeOnSameLine": true, "MaxAttributeCharactersPerLine": 0, "MaxAttributesPerLine": 1, - "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter", + "NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter, StaticResource", "SeparateByGroups": false, "AttributeIndentation": 0, - "AttributeIndentationStyle": 1, + "AttributeIndentationStyle": 0, "RemoveDesignTimeReferences": false, "IgnoreDesignTimeReferencePrefix": false, - "EnableAttributeReordering": true, + "EnableAttributeReordering": false, "AttributeOrderingRuleGroups": [ "x:Class", "xmlns, xmlns:x", @@ -24,12 +24,12 @@ "Storyboard.*, From, To, Duration" ], "FirstLineAttributes": "", - "OrderAttributesByName": true, + "OrderAttributesByName": false, "PutEndingBracketOnNewLine": false, "RemoveEndingTagOfEmptyElement": true, "SpaceBeforeClosingSlash": true, "RootElementLineBreakRule": 0, - "ReorderVSM": 2, + "ReorderVSM": 0, "ReorderGridChildren": false, "ReorderCanvasChildren": false, "ReorderSetters": 0, @@ -37,6 +37,6 @@ "NoNewLineMarkupExtensions": "x:Bind, Binding", "ThicknessSeparator": 2, "ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", - "FormatOnSave": true, - "CommentPadding": 2, -} \ No newline at end of file + "FormatOnSave": false, + "CommentPadding": 1, +}