3323dc5724
This adds [`XamlStyler.Console`] to our solution, and calls it when we format the code, to also format our .xaml files. * `XamlStyler.Console` is a dotnet tool so it needs to be restored with `dotnet tool restore` * I've added a set of rules to approximately follow [@cmaneu's XAML guidelines]. Those guidelines also recommend things based on the code-behind, which this tool can't figure out, but also _don't matter that much_. * There's an extra step to strip BOMs from the output, since Xaml Styler adds a BOM by default. Some had them before and others didn't. BOMs have been nothing but trouble though. [`XamlStyler.Console`]: https://github.com/Xavalon/XamlStyler [@cmaneu's XAML guidelines]: https://github.com/cmaneu/xaml-coding-guidelines
61 lines
2.7 KiB
XML
61 lines
2.7 KiB
XML
<!--
|
|
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
|
the MIT License. See LICENSE in the project root for license information.
|
|
-->
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<Style x:Key="SettingContainerHeaderStyle"
|
|
TargetType="StackPanel">
|
|
<Setter Property="Orientation" Value="Horizontal" />
|
|
<Setter Property="Margin" Value="0,0,0,4" />
|
|
</Style>
|
|
|
|
<Style x:Key="SettingContainerResetButtonStyle"
|
|
TargetType="Button">
|
|
<Setter Property="Margin" Value="5,0,0,0" />
|
|
<Setter Property="Height" Value="19" />
|
|
<Setter Property="Width" Value="19" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
</Style>
|
|
|
|
<Style x:Key="SettingContainerFontIconStyle"
|
|
TargetType="FontIcon">
|
|
<Setter Property="Foreground" Value="{StaticResource SystemAccentColor}" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
|
|
</Style>
|
|
|
|
<Style TargetType="local:SettingContainer">
|
|
<Setter Property="Margin" Value="0,24,0,0" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:SettingContainer">
|
|
<StackPanel>
|
|
|
|
<!-- Header space -->
|
|
<StackPanel Style="{StaticResource SettingContainerHeaderStyle}">
|
|
<TextBlock Text="{TemplateBinding Header}" />
|
|
<Button x:Name="ResetButton"
|
|
Style="{StaticResource SettingContainerResetButtonStyle}">
|
|
<FontIcon Glyph=""
|
|
Style="{StaticResource SettingContainerFontIconStyle}" />
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<!-- This is where the actual setting control will go -->
|
|
<ContentPresenter Content="{TemplateBinding Content}" />
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|