got 2 styles that kinda work I guess
This commit is contained in:
parent
0b58355ef4
commit
ba4faec04f
|
@ -45,7 +45,6 @@
|
|||
|
||||
<!-- Color Scheme -->
|
||||
<local:SettingContainer x:Uid="Profile_ColorScheme"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearColorSchemeName}"
|
||||
HasSettingValue="{x:Bind Appearance.HasColorSchemeName, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.ColorSchemeNameOverrideSource, Mode=OneWay}">
|
||||
|
@ -170,7 +169,6 @@
|
|||
|
||||
<!-- Cursor Shape -->
|
||||
<local:SettingContainer x:Uid="Profile_CursorShape"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearCursorShape}"
|
||||
HasSettingValue="{x:Bind Appearance.HasCursorShape, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.CursorShapeOverrideSource, Mode=OneWay}">
|
||||
|
@ -211,7 +209,6 @@
|
|||
<!-- Background Image -->
|
||||
<local:SettingContainer x:Name="BackgroundImageContainer"
|
||||
x:Uid="Profile_BackgroundImage"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearBackgroundImagePath}"
|
||||
HasSettingValue="{x:Bind Appearance.HasBackgroundImagePath, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.BackgroundImagePathOverrideSource, Mode=OneWay}">
|
||||
|
@ -450,7 +447,6 @@
|
|||
|
||||
<!-- Intense is bold, bright -->
|
||||
<local:SettingContainer x:Uid="Appearance_IntenseTextStyle"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind Appearance.ClearIntenseTextStyle}"
|
||||
HasSettingValue="{x:Bind Appearance.HasIntenseTextStyle, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind Appearance.IntenseTextStyleOverrideSource, Mode=OneWay}">
|
||||
|
|
|
@ -11,26 +11,6 @@
|
|||
<ResourceDictionary Source="SettingContainerStyle.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<ResourceDictionary.ThemeDictionaries>
|
||||
<ResourceDictionary x:Key="Light">
|
||||
<Style x:Key="SecondaryTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="Dark">
|
||||
<Style x:Key="SecondaryTextBlockStyle"
|
||||
TargetType="TextBlock">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
<ResourceDictionary x:Key="HighContrast">
|
||||
<Style x:Key="SecondaryTextBlockStyle"
|
||||
TargetType="TextBlock" />
|
||||
<!-- Do not mess with the foreground color for High Contrast. Let it ride as is. -->
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
<x:Double x:Key="StandardIconSize">14.0</x:Double>
|
||||
<Thickness x:Key="StandardIndentMargin">13,0,0,0</Thickness>
|
||||
<Thickness x:Key="StandardControlMargin">0,24,0,0</Thickness>
|
||||
|
@ -56,7 +36,7 @@
|
|||
<Style x:Key="PivotStackStyle"
|
||||
TargetType="StackPanel">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Margin" Value="0,0,0,48" />
|
||||
<Setter Property="Margin" Value="13,0,0,48" />
|
||||
</Style>
|
||||
|
||||
<!-- Combo Box -->
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Language -->
|
||||
<local:SettingContainer x:Uid="Globals_Language"
|
||||
Margin="0"
|
||||
Visibility="{x:Bind LanguageSelectorAvailable}">
|
||||
<ComboBox ItemsSource="{x:Bind LanguageList}"
|
||||
SelectedItem="{x:Bind CurrentLanguage, Mode=TwoWay}">
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
<ScrollViewer ViewChanging="ViewChanging">
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Copy On Select -->
|
||||
<local:SettingContainer x:Uid="Globals_CopyOnSelect"
|
||||
Margin="0">
|
||||
<local:SettingContainer x:Uid="Globals_CopyOnSelect">
|
||||
<ToggleSwitch IsOn="{x:Bind State.Globals.CopyOnSelect, Mode=TwoWay}" />
|
||||
</local:SettingContainer>
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
<StackPanel>
|
||||
<StackPanel Style="{StaticResource SettingsStackStyle}">
|
||||
<!-- Default Profile -->
|
||||
<local:SettingContainer x:Uid="Globals_DefaultProfile"
|
||||
Margin="0">
|
||||
<local:SettingContainer x:Name="zzzknn"
|
||||
x:Uid="Globals_DefaultProfile">
|
||||
<ComboBox x:Name="DefaultProfile"
|
||||
ItemsSource="{x:Bind DefaultProfiles}"
|
||||
SelectedItem="{x:Bind CurrentDefaultProfile, Mode=TwoWay}"
|
||||
|
@ -168,8 +168,7 @@
|
|||
Style="{StaticResource SubtitleTextBlockStyle}" />
|
||||
|
||||
<!-- Columns -->
|
||||
<local:SettingContainer x:Uid="Globals_InitialCols"
|
||||
Margin="0">
|
||||
<local:SettingContainer x:Uid="Globals_InitialCols">
|
||||
<muxc:NumberBox x:Uid="Globals_InitialColsBox"
|
||||
Style="{StaticResource LaunchSizeNumberBoxStyle}"
|
||||
Value="{x:Bind State.Settings.GlobalSettings.InitialCols, Mode=TwoWay}" />
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
so the name will always be overridden.
|
||||
-->
|
||||
<local:SettingContainer x:Uid="Profile_Name"
|
||||
Margin="0,0,0,24"
|
||||
Visibility="{x:Bind local:Converters.InvertedBooleanToVisibility(State.Profile.IsBaseLayer), Mode=OneWay}">
|
||||
<TextBox Style="{StaticResource TextBoxSettingStyle}"
|
||||
Text="{x:Bind State.Profile.Name, Mode=TwoWay}" />
|
||||
|
@ -75,7 +74,6 @@
|
|||
<!-- Commandline -->
|
||||
<local:SettingContainer x:Name="CommandlineContainer"
|
||||
x:Uid="Profile_Commandline"
|
||||
Margin="0,0,0,24"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearCommandline}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasCommandline, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.CommandlineOverrideSource, Mode=OneWay}"
|
||||
|
@ -94,7 +92,6 @@
|
|||
<!-- Starting Directory -->
|
||||
<local:SettingContainer x:Name="StartingDirectoryContainer"
|
||||
x:Uid="Profile_StartingDirectory"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearStartingDirectory}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasStartingDirectory, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.StartingDirectoryOverrideSource, Mode=OneWay}">
|
||||
|
@ -249,7 +246,6 @@
|
|||
<!-- Opacity -->
|
||||
<local:SettingContainer x:Name="OpacityContainer"
|
||||
x:Uid="Profile_Opacity"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearOpacity}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasOpacity, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.OpacityOverrideSource, Mode=OneWay}">
|
||||
|
@ -271,7 +267,6 @@
|
|||
|
||||
<!-- Use Acrylic -->
|
||||
<local:SettingContainer x:Uid="Profile_UseAcrylic"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearUseAcrylic}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasUseAcrylic, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.UseAcrylicOverrideSource, Mode=OneWay}">
|
||||
|
@ -288,7 +283,6 @@
|
|||
|
||||
<!-- Padding -->
|
||||
<local:SettingContainer x:Uid="Profile_Padding"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearPadding}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasPadding, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.PaddingOverrideSource, Mode=OneWay}">
|
||||
|
@ -405,7 +399,6 @@
|
|||
<StackPanel Style="{StaticResource PivotStackStyle}">
|
||||
<!-- Suppress Application Title -->
|
||||
<local:SettingContainer x:Uid="Profile_SuppressApplicationTitle"
|
||||
Margin="0"
|
||||
ClearSettingValue="{x:Bind State.Profile.ClearSuppressApplicationTitle}"
|
||||
HasSettingValue="{x:Bind State.Profile.HasSuppressApplicationTitle, Mode=OneWay}"
|
||||
SettingOverrideSource="{x:Bind State.Profile.SuppressApplicationTitleOverrideSource, Mode=OneWay}">
|
||||
|
|
|
@ -72,6 +72,23 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
|||
|
||||
void SettingContainer::OnApplyTemplate()
|
||||
{
|
||||
if (const auto& child{ GetTemplateChild(L"ExpanderButton") })
|
||||
{
|
||||
if (const auto& toggleButton{ child.try_as<Controls::Primitives::ToggleButton>() })
|
||||
{
|
||||
toggleButton.Click([=](auto&&, auto&&) {
|
||||
if (const auto& expanderChild{ GetTemplateChild(L"MainContentContainer") })
|
||||
{
|
||||
if (const auto& expander{ expanderChild.try_as<Controls::Border>() })
|
||||
{
|
||||
const auto newVisibility = expander.Visibility() == Visibility::Visible ? Visibility::Collapsed : Visibility::Visible;
|
||||
expander.Visibility(newVisibility);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (const auto& child{ GetTemplateChild(L"ResetButton") })
|
||||
{
|
||||
if (const auto& button{ child.try_as<Controls::Button>() })
|
||||
|
|
|
@ -9,6 +9,48 @@
|
|||
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" />
|
||||
|
@ -31,41 +73,452 @@
|
|||
<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,24,0,0" />
|
||||
<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="60"
|
||||
HorizontalAlignment="Stretch"
|
||||
Margin="16"
|
||||
CornerRadius="4"
|
||||
Background="{ThemeResource SystemChromeMediumLowColor}">
|
||||
<Grid Height="70"
|
||||
Margin="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Background="{ThemeResource SystemChromeMediumColor}"
|
||||
CornerRadius="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<FontIcon Grid.Column="0"
|
||||
Style="{StaticResource SettingContainerFontIconStyle}"
|
||||
Glyph="" />
|
||||
<StackPanel Grid.Column="1"
|
||||
Orientation="Vertical"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock Text="{TemplateBinding Header}"
|
||||
FontSize="16"/>
|
||||
<TextBlock Text="{TemplateBinding HelpText}"
|
||||
FontSize="14"
|
||||
Foreground="{ThemeResource SystemBaseMediumColor}"/>
|
||||
<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="2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Margin="8"
|
||||
BorderBrush="Transparent"
|
||||
Content="{TemplateBinding Content}"/>
|
||||
<ContentPresenter Grid.Column="1"
|
||||
Margin="8"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="Transparent"
|
||||
Content="{TemplateBinding Content}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ControlTemplate>
|
||||
|
|
Loading…
Reference in a new issue