This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Settings.XamlStyler
64 lines (64 loc) · 4.17 KB
/
Settings.XamlStyler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
/****************属性格式化**************************/
"AttributesTolerance": 3, //单行最大属性数,2【默认】,如果元素属性数不大于此数就不会换行
"KeepFirstAttributeOnSameLine": true, //第一个属性是否与开始标记在同一行,false【默认】
"MaxAttributeCharactersPerLine": 100, //多个属性大于多少个字符就该换行,0【默认】
"MaxAttributesPerLine": 3, //大于几个属性就该换行,1【默认】
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter, Geometry,",
"SeparateByGroups": true, //是否应该按照属性的分组进行分隔,false【默认】
"AttributeIndentation": 0, //属性缩进空格字符数(-1不缩进;0【默认】缩进4个空格;其它个数则指定)
"AttributeIndentationStyle": 1, //属性缩进风格(0混合,视情况使用制表符和空格;1【默认】使用空格)
"RemoveDesignTimeReferences": false, //是否移除自动添加的控件和设计时参考内容,false【默认】
"EnableAttributeReordering": true, //是否启用属性的自动排序,true【默认】
"AttributeOrderingRuleGroups": [ //属性排序和分组规则
"x:Class",
"x:ClassModifier",
"xmlns, xmlns:x",
"xmlns:*",
"x:Key, Key, x:Name, Name, x:Uid, Uid, TargetType, BasedOn, ",
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText, d:*",
"Title",
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Columns, Rows, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom, DockPanel.Dock",
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
"Text, Content, Header, Data, ContextMenu,",
"BorderBrush, BorderThickness",
"Foreground, Background, CornerRadius, Fill",
"Command, CommandParameter, IsChecked, IsEnabled",
"Source, Stretch, ImageSource",
"FontSize, FontFamliy, FontWeight",
"ContentTemplate,ContentStringFormat,ContentTemplateSelector",
"ResizeBehavior, ResizeDirection,RecognizesAccessKey",
"PageSource, PageIndex, Offset, Color, Binding, Property, Value, TargetName, StartPoint, EndPoint",
"Minimum, Maximum",
"Margin, Padding, Opacity, SnapsToDevicePixels, Focusable, ToolTip",
"HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
"Storyboard.*,",
"From, To, Duration, RepeatBehavior",
"*",
"Visibility",
"Style",
"*:*"
],
"FirstLineAttributes": "x:Name,Grid.Row,Grid.Column", //应该在第一行的属性,例如Name x:Name 和x:Uid等等,None【默认】
"OrderAttributesByName": true, //是否按照属性名称进行排序
/****************元素格式化**************************/
"PutEndingBracketOnNewLine": false, //结束括号是否独占一行,false【默认】
"RemoveEndingTagOfEmptyElement": true, //是否移除空元素的结束标签,true【默认】
"SpaceBeforeClosingSlash": true, //自闭合元素的末尾斜杠前是否要有空格,true【默认】
"RootElementLineBreakRule": 1, //是否将根元素的属性分成多行(0【默认】;1始终;2从不)
/****************元素排序**************************/
"ReorderVSM": 2, //是否重新排序visual state Manager(0未定义;1【默认】移到最后;2移到最前)
"ReorderGridChildren": false, //是否重新排序Grid的子元素,false【默认】
"ReorderCanvasChildren": false, //是否重新排序Canvas的子元素,false【默认】
"ReorderSetters": 0, //是否重新排序Setter(0【默认】不排序;1按属性名;2按目标名;3先按目标名再按属性名)
/****************标记扩展**************************/
"FormatMarkupExtension": true, //是否格式化标记扩展的属性,true【默认】
"NoNewLineMarkupExtensions": "x:Bind, Binding, TemplateBinding, ", //始终放在一行上的标记扩展,"x:Bind, Binding"【默认】
"ThicknessSeparator": 2, //Thickness类型的属性应该用哪种分隔符(0不格式化;1空格;2【默认】逗号)
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin", //被认定为Thickness的元素应该是哪些
"FormatOnSave": false, //是否在保存时进行格式化,true【默认】
"CommentPadding": 2, //注释的间距应该是几个空格,2【默认】
/****************覆盖VS配置**************************/
"IndentSize": 4, //缩进空格数,4【默认】
"IndentWithTabs": false //是否使用制表符进行缩进,false【默认】
}