530 lines
36 KiB
XML
530 lines
36 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">
|
|
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Default">
|
|
<StaticResource x:Key="ExpanderBorderBrushExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundTransparentBrush" />
|
|
<StaticResource x:Key="ExpanderTextColorExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundBaseHighBrush" />
|
|
<Style x:Key="SecondaryTextBlockStyle"
|
|
TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Light">
|
|
<StaticResource x:Key="ExpanderBorderBrushExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundTransparentBrush" />
|
|
<StaticResource x:Key="ExpanderTextColorExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundBaseHighBrush" />
|
|
<Style x:Key="SecondaryTextBlockStyle"
|
|
TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="HighContrast">
|
|
<StaticResource x:Key="ExpanderBorderBrushExpandedPointerOver"
|
|
ResourceKey="SystemControlHighlightBaseHighBrush" />
|
|
<StaticResource x:Key="ExpanderTextColorExpandedPointerOver"
|
|
ResourceKey="SystemColorHighlightTextColor" />
|
|
<Style x:Key="SecondaryTextBlockStyle"
|
|
TargetType="TextBlock" />
|
|
<!-- Do not mess with the foreground color for High Contrast. Let it ride as is. -->
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Dark">
|
|
<StaticResource x:Key="ExpanderBorderBrushExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundTransparentBrush" />
|
|
<StaticResource x:Key="ExpanderTextColorExpandedPointerOver"
|
|
ResourceKey="SystemControlForegroundBaseHighBrush" />
|
|
<Style x:Key="SecondaryTextBlockStyle"
|
|
TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
|
|
<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 x:Key="HeaderToggleButtonStyle"
|
|
TargetType="ToggleButton">
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlTransparentBrush}" />
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
|
|
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundTransparentBrush}" />
|
|
<Setter Property="BorderThickness" Value="{ThemeResource ToggleButtonBorderThemeThickness}" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Height" Value="70" />
|
|
<Setter Property="Margin" Value="2" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
|
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Grid x:Name="RootGrid"
|
|
Background="{ThemeResource SystemChromeMediumColor}"
|
|
CornerRadius="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Rectangle x:Name="HoverPanel"
|
|
Grid.ColumnSpan="2"
|
|
Fill="Transparent"
|
|
Stroke="{TemplateBinding BorderBrush}"
|
|
StrokeThickness="{TemplateBinding BorderThickness}" />
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Grid.Column="0"
|
|
Width="100000000"
|
|
Margin="12,0,0,0"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
RenderTransformOrigin="0.5,0.5" />
|
|
<Slider x:Name="ArrowRotation"
|
|
Maximum="180"
|
|
Minimum="0"
|
|
Visibility="Collapsed"
|
|
Value="180" />
|
|
<FontIcon x:Name="Arrow"
|
|
Grid.Column="1"
|
|
Margin="12"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="12"
|
|
Glyph=""
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<FontIcon.RenderTransform>
|
|
<RotateTransform />
|
|
</FontIcon.RenderTransform>
|
|
</FontIcon>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="0.0"
|
|
Duration="0:0:0" />
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{TemplateBinding BorderBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundListLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderBorderBrushExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="0.0"
|
|
Duration="0:0:0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundListMediumBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderBorderBrushExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="0.0"
|
|
Duration="0:0:0" />
|
|
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="0.0"
|
|
Duration="0:0:0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Checked">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlTransparentBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{TemplateBinding BorderBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="{Binding ElementName=ArrowRotation, Path=Value}"
|
|
Duration="0:0:0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightListAccentMediumBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderBorderBrushExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderTextColorExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderTextColorExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="{Binding ElementName=ArrowRotation, Path=Value}"
|
|
Duration="0:0:0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightListAccentHighBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Stroke">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderBorderBrushExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderTextColorExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource ExpanderTextColorExpandedPointerOver}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="{Binding ElementName=ArrowRotation, Path=Value}"
|
|
Duration="0:0:0" />
|
|
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedDisabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<DoubleAnimation BeginTime="0:0:0"
|
|
Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
|
To="{Binding ElementName=ArrowRotation, Path=Value}"
|
|
Duration="0:0:0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Indeterminate">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminatePointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightBaseHighBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightBaseHighBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminatePressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundBaseMediumLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightBaseHighBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlHighlightBaseHighBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminateDisabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HoverPanel"
|
|
Storyboard.TargetProperty="Fill">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlDisabledBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
|
|
Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0"
|
|
Value="{ThemeResource SystemControlDisabledBaseLowBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="ExpandDirectionStates">
|
|
<VisualState x:Name="RightDirection" />
|
|
<VisualState x:Name="DownDirection" />
|
|
<VisualState x:Name="LeftDirection">
|
|
<VisualState.Setters>
|
|
<Setter Target="ArrowRotation.Value" Value="-90" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="UpDirection">
|
|
<VisualState.Setters>
|
|
<Setter Target="ArrowRotation.Value" Value="-90" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="local:SettingContainer"
|
|
x:Key="AlternativeSettingContainerStyle">
|
|
<Setter Property="Margin" Value="0,0,8,0" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:SettingContainer">
|
|
<Border>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<!-- Expander header -->
|
|
<ToggleButton x:Name="ExpanderButton"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="1"
|
|
RenderTransformOrigin="0.5,0.5"
|
|
Style="{StaticResource HeaderToggleButtonStyle}">
|
|
<ToggleButton.Content>
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBlock Text="{TemplateBinding Header}" />
|
|
<TextBlock FontSize="12"
|
|
FontWeight="Normal"
|
|
Style="{ThemeResource SecondaryTextBlockStyle}"
|
|
Text="{TemplateBinding HelpText}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</ToggleButton.Content>
|
|
</ToggleButton>
|
|
|
|
<!-- Expander content -->
|
|
<Border x:Name="MainContentContainer"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="1"
|
|
Height="Auto"
|
|
Margin="12,4,0,0"
|
|
Visibility="Collapsed">
|
|
<ContentPresenter HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
Content="{TemplateBinding Content}" />
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Visual states -->
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ViewStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition GeneratedDuration="0:0:0" />
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Collapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MainContentContainer"
|
|
Storyboard.TargetProperty="(UIElement.Visibility)">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0"
|
|
Value="Collapsed" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Expanded">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MainContentContainer"
|
|
Storyboard.TargetProperty="(UIElement.Visibility)">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0"
|
|
Value="Visible" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="local:SettingContainer">
|
|
<Setter Property="Margin" Value="0,0,8,0" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="local:SettingContainer">
|
|
<StackPanel>
|
|
<Grid Height="70"
|
|
Margin="2"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{ThemeResource SystemChromeMediumColor}"
|
|
CornerRadius="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0"
|
|
Margin="12,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Vertical">
|
|
<TextBlock FontWeight="SemiBold"
|
|
Text="{TemplateBinding Header}" />
|
|
<TextBlock FontSize="12"
|
|
FontWeight="Normal"
|
|
Style="{ThemeResource SecondaryTextBlockStyle}"
|
|
Text="{TemplateBinding HelpText}" />
|
|
</StackPanel>
|
|
<ContentPresenter Grid.Column="1"
|
|
Margin="8"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
BorderBrush="Transparent"
|
|
Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|