123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}">
- <Grid Background="Transparent" SnapsToDevicePixels="False">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="19" />
- </Grid.ColumnDefinitions>
- <Path
- x:Name="arrow"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M4 5.00023L8.00012 0.000115851H-0.000115851L4 5.00023Z"
- Fill="#8F96A7"
- SnapsToDevicePixels="false"
- Visibility="Collapsed" />
- <Path
- x:Name="arrow2"
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M5.00023 4L0.000115514 -0.000116188L0.000116188 8.00012L5.00023 4Z"
- Fill="#8F96A7"
- SnapsToDevicePixels="false" />
- <ContentPresenter
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Visibility" Value="Visible" />
- <Setter TargetName="arrow2" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true" />
- <Trigger Property="IsPressed" Value="true" />
- <Trigger Property="IsEnabled" Value="false" />
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="PromotionExpanderStyle" TargetType="{x:Type Expander}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="FontSize" Value="12" />
- <Setter Property="FontWeight" Value="SemiBold" />
- <Setter Property="FontFamily" Value="Segoe UI" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Expander}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="3"
- SnapsToDevicePixels="true">
- <DockPanel>
- <ToggleButton
- x:Name="HeaderSite"
- MinWidth="0"
- MinHeight="0"
- Margin="0"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- DockPanel.Dock="Top"
- FontFamily="{TemplateBinding FontFamily}"
- FontSize="{TemplateBinding FontSize}"
- FontStretch="{TemplateBinding FontStretch}"
- FontStyle="{TemplateBinding FontStyle}"
- FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
- IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ExpanderDownHeaderStyle}" />
- <ContentPresenter
- x:Name="ExpandSite"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- DockPanel.Dock="Bottom"
- Focusable="false"
- Visibility="Collapsed" />
- </DockPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Right">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Up">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Left">
- <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
- <Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false" />
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ExpanderHeaderFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Border>
- <Rectangle
- Margin="0"
- SnapsToDevicePixels="true"
- Stroke="Black"
- StrokeDashArray="1 2"
- StrokeThickness="1" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <SolidColorBrush x:Key="Expander.MouseOver.Circle.Stroke" Color="#FF5593FF" />
- <SolidColorBrush x:Key="Expander.MouseOver.Circle.Fill" Color="#FFF3F9FF" />
- <SolidColorBrush x:Key="Expander.MouseOver.Arrow.Stroke" Color="#616469" />
- <SolidColorBrush x:Key="Expander.Pressed.Circle.Stroke" Color="#FF3C77DD" />
- <SolidColorBrush x:Key="Expander.Pressed.Circle.Fill" Color="#FFD9ECFF" />
- <SolidColorBrush x:Key="Expander.Pressed.Arrow.Stroke" Color="#616469" />
- <SolidColorBrush x:Key="Expander.Disabled.Circle.Stroke" Color="#FFBCBCBC" />
- <SolidColorBrush x:Key="Expander.Disabled.Circle.Fill" Color="#FFE6E6E6" />
- <SolidColorBrush x:Key="Expander.Disabled.Arrow.Stroke" Color="#FF707070" />
- <SolidColorBrush x:Key="Expander.Static.Circle.Fill" Color="#FFFFFFFF" />
- <SolidColorBrush x:Key="Expander.Static.Circle.Stroke" Color="#FF333333" />
- <SolidColorBrush x:Key="Expander.Static.Arrow.Stroke" Color="#FF333333" />
- <Style x:Key="GropExpanderStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Padding="{TemplateBinding Padding}">
- <Grid Background="{StaticResource color.sys.layout.fg.light}" SnapsToDevicePixels="False">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="35" />
- </Grid.ColumnDefinitions>
- <Ellipse
- x:Name="circle"
- Width="19"
- Height="19"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{StaticResource Expander.Static.Circle.Fill}"
- Stroke="{StaticResource Expander.Static.Circle.Stroke}"
- Visibility="Collapsed" />
- <Rectangle Grid.Column="0" />
- <Path
- Name="arrowdown"
- Grid.Column="1"
- Margin="0,0,15,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M6 7.56427L2.03039 3.59467L0.969727 4.65533L5.46967 9.15526C5.76256 9.44816 6.23743 9.44816 6.53033 9.15526L11.0303 4.65533L9.9696 3.59467L6 7.56427Z"
- Fill="Black" />
- <Path
- Name="Collapsed"
- Grid.Column="1"
- Margin="0,0,15,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Data="M7.56438 5.99999L3.59473 9.96964L4.65539 11.0303L9.15537 6.53032C9.44826 6.23743 9.44826 5.76255 9.15537 5.46966L4.65539 0.969675L3.59473 2.03033L7.56438 5.99999Z"
- Fill="Black" />
- <ContentPresenter
- Grid.Column="0"
- Margin="2,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Center"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Collapsed" Property="Visibility" Value="Collapsed" />
- <Setter TargetName="arrowdown" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="Collapsed" Property="Visibility" Value="Visible" />
- <Setter TargetName="arrowdown" Property="Visibility" Value="Collapsed" />
- </Trigger>
- <!--<Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.MouseOver.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.MouseOver.Circle.Fill}" />
- <Setter TargetName="Collapsed" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>-->
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Pressed.Circle.Stroke}" />
- <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Pressed.Circle.Fill}" />
- <Setter TargetName="Collapsed" Property="Stroke" Value="{StaticResource Expander.Pressed.Arrow.Stroke}" />
- <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.MouseOver.Arrow.Stroke}" />
- </Trigger>-->
- <!--<Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="circle" Property="Stroke" Value="{StaticResource Expander.Disabled.Circle.Stroke}" />
- <Setter TargetName="circle" Property="Fill" Value="{StaticResource Expander.Disabled.Circle.Fill}" />
- <Setter TargetName="Collapsed" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- <Setter TargetName="arrowdown" Property="Stroke" Value="{StaticResource Expander.Disabled.Arrow.Stroke}" />
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="GropExpanderHeader" TargetType="{x:Type Expander}">
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- <Setter Property="Background" Value="{StaticResource color.sys.layout.mg}" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Expander}">
- <Border
- Margin="0,2"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="4"
- SnapsToDevicePixels="true">
- <DockPanel>
- <ContentPresenter
- x:Name="ExpandSite"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- DockPanel.Dock="Bottom"
- Focusable="false"
- Visibility="Collapsed" />
- <ToggleButton
- x:Name="HeaderSite"
- MinWidth="0"
- MinHeight="0"
- Margin="1"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- DockPanel.Dock="Top"
- FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
- FontFamily="{TemplateBinding FontFamily}"
- FontSize="{TemplateBinding FontSize}"
- FontStretch="{TemplateBinding FontStretch}"
- FontStyle="{TemplateBinding FontStyle}"
- FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
- IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource GropExpanderStyle}" />
- </DockPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsExpanded" Value="false">
- <Setter Property="Foreground" Value="{StaticResource color.sys.text.neutral.lv1}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|