Skip to content

Commit

Permalink
Preparing for XAMLStyler
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Aug 29, 2021
1 parent 78e9c8b commit 9f4cb64
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ protected override void OnBuildInitialized()
Target Restore => _ => _
.Executes(() =>
{
DotNetToolRestore();
DotNetRestore(s => s
.SetProjectFile(Solution));
});
Expand All @@ -75,6 +77,8 @@ protected override void OnBuildInitialized()
.DependsOn(Restore)
.Executes(() =>
{
DotNet($"xstyler -r -d \"{RootDirectory}\"");
DotNetBuild(s => s
.SetProjectFile(Solution)
.SetConfiguration(Configuration)
Expand Down
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"xamlstyler.console": {
"version": "3.2008.4",
"commands": [
"xstyler"
]
}
}
}
42 changes: 42 additions & 0 deletions Settings.XAMLStyler
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"IndentSize": 4,
"AttributesTolerance": 1,
"KeepFirstAttributeOnSameLine": true,
"MaxAttributeCharactersPerLine": 0,
"MaxAttributesPerLine": 1,
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransform, SkewTransform, RotateTransform, TranslateTransform, Trigger, MultiTrigger, DataTrigger, MultiDataTrigger, Condition, Setter, SolidColorBrush, Pen",
"SeparateByGroups": false,
"AttributeIndentation": 0,
"AttributeIndentationStyle": 1,
"RemoveDesignTimeReferences": 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, Color, Opacity, Offset, TargetName, Property, Value, StartPoint, EndPoint",
"*:Freeze, mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText",
"Storyboard.*, From, To, Duration"
],
"FirstLineAttributes": "",
"OrderAttributesByName": true,
"PutEndingBracketOnNewLine": false,
"RemoveEndingTagOfEmptyElement": true,
"SpaceBeforeClosingSlash": true,
"RootElementLineBreakRule": 1,
"ReorderVSM": 2,
"ReorderGridChildren": false,
"ReorderCanvasChildren": false,
"ReorderSetters": 3,
"FormatMarkupExtension": true,
"NoNewLineMarkupExtensions": "x:Bind, Binding, TemplateBinding, x:Static, DynamicResource, ComponentResourceKey",
"ThicknessSeparator": 1,
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin",
"FormatOnSave": false,
"CommentPadding": 1,
}

0 comments on commit 9f4cb64

Please sign in to comment.