| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <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="Foreground" Value="{DynamicResource AcountGridHeadForeground}" />
- <Setter Property="Background" Value="{DynamicResource ExpanderHeadBrush}" />
- <Setter Property="FontWeight" Value="Light" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border Background="{TemplateBinding Background}">
- <Grid Margin="{TemplateBinding Padding}" SnapsToDevicePixels="False">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="19" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Border Width="19"
- Height="19"
- SnapsToDevicePixels="true">
- <Path x:Name="arrow"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M 0 2 L 0 3 L 2 3 L 2 5 L 3 5 L 3 3 L 5 3 L 5 2 L 3 2 L 3 0 L 2 0 L 2 2 Z"
- SnapsToDevicePixels="false"
- Stroke="{TemplateBinding Foreground}"
- StrokeThickness="1" />
- </Border>
- <ContentPresenter Grid.Column="1"
- Margin="4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="True" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="arrow" Property="Data" Value="M 0 2 L 0 3 L 5 3 L 5 2 Z" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true" />
- <Trigger Property="IsPressed" Value="true" />
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="AccountExpanderStyle" TargetType="{x:Type Expander}">
- <Setter Property="Foreground" Value="{DynamicResource AccountExpanderStyleHeadForeground}" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="HorizontalAlignment" Value="Stretch" />
- <Setter Property="ScrollViewer.CanContentScroll" Value="False" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="Margin" Value="0,1,0,0" />
- <Setter Property="Padding" Value="0,2,0,0" />
- <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">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <ToggleButton x:Name="HeaderSite"
- Grid.Row="0"
- MinWidth="0"
- MinHeight="0"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- 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}}"
- Padding="{TemplateBinding Padding}"
- Style="{StaticResource ExpanderDownHeaderStyle}" />
- <ContentPresenter x:Name="ExpandSite"
- Grid.Row="1"
- Margin="0,1"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Focusable="false"
- Visibility="Collapsed" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="true">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|