123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <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" Visibility="Collapsed" Grid.Column="1" Data="M4 5.00023L8.00012 0.000115851H-0.000115851L4 5.00023Z" HorizontalAlignment="Center" Fill="#8F96A7" SnapsToDevicePixels="false" VerticalAlignment="Center"/>
- <Path x:Name="arrow2" Grid.Column="1" Data="M5.00023 4L0.000115514 -0.000116188L0.000116188 8.00012L5.00023 4Z" HorizontalAlignment="Center" Fill="#8F96A7" SnapsToDevicePixels="false" VerticalAlignment="Center"/>
- <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="True" VerticalAlignment="Center"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter Property="Visibility" TargetName="arrow" Value="Visible"/>
- <Setter Property="Visibility" TargetName="arrow2" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="PromotionExpanderStyle" TargetType="{x:Type Expander}">
- <Setter Property="Background" Value="Transparent"/>
- <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 Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" SnapsToDevicePixels="true">
- <DockPanel>
- <ToggleButton x:Name="HeaderSite" Margin="1" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" DockPanel.Dock="Top" FontStretch="{TemplateBinding FontStretch}" Foreground="{TemplateBinding Foreground}" FontStyle="{TemplateBinding FontStyle}" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" FontSize="{TemplateBinding FontSize}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="0" MinHeight="0" Padding="{TemplateBinding Padding}" Style="{StaticResource ExpanderDownHeaderStyle}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
- <ContentPresenter x:Name="ExpandSite" DockPanel.Dock="Bottom" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed"/>
- </DockPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Right">
- <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
- <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Up">
- <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
- <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
- </Trigger>
- <Trigger Property="ExpandDirection" Value="Left">
- <Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
- <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|