|
2044 | 2044 | <Border Padding="{TemplateBinding Padding}">
|
2045 | 2045 | <Grid Background="Transparent" SnapsToDevicePixels="False">
|
2046 | 2046 | <Grid.ColumnDefinitions>
|
2047 |
| - <ColumnDefinition Width="19" /> |
2048 | 2047 | <ColumnDefinition Width="*" />
|
| 2048 | + <ColumnDefinition Width="Auto" /> |
2049 | 2049 | </Grid.ColumnDefinitions>
|
2050 |
| - <Ellipse |
2051 |
| - x:Name="circle" |
2052 |
| - Width="19" |
2053 |
| - Height="19" |
2054 |
| - HorizontalAlignment="Center" |
2055 |
| - VerticalAlignment="Center" |
2056 |
| - Stroke="Transparent" /> |
2057 |
| - <Path |
2058 |
| - x:Name="arrow" |
2059 |
| - HorizontalAlignment="Center" |
2060 |
| - VerticalAlignment="Center" |
2061 |
| - Data="M 1,1.5 L 4.5,5 L 8,1.5" |
2062 |
| - SnapsToDevicePixels="false" |
2063 |
| - Stroke="#666" |
2064 |
| - StrokeThickness="1" /> |
2065 | 2050 | <ContentPresenter
|
2066 |
| - Grid.Column="1" |
2067 |
| - Margin="4,0,0,0" |
2068 |
| - HorizontalAlignment="Left" |
2069 |
| - VerticalAlignment="Center" |
| 2051 | + Grid.Column="0" |
| 2052 | + Margin="0,0,0,0" |
| 2053 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 2054 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 2055 | + Content="{TemplateBinding Content}" |
2070 | 2056 | RecognizesAccessKey="True"
|
2071 | 2057 | SnapsToDevicePixels="True" />
|
| 2058 | + <Grid |
| 2059 | + x:Name="ChevronGrid" |
| 2060 | + Grid.Column="1" |
| 2061 | + Margin="0" |
| 2062 | + VerticalAlignment="Center" |
| 2063 | + Background="Transparent" |
| 2064 | + RenderTransformOrigin="0.5, 0.5"> |
| 2065 | + <Grid.RenderTransform> |
| 2066 | + <RotateTransform Angle="0" /> |
| 2067 | + </Grid.RenderTransform> |
| 2068 | + <Ellipse |
| 2069 | + x:Name="circle" |
| 2070 | + Width="19" |
| 2071 | + Height="19" |
| 2072 | + HorizontalAlignment="Center" |
| 2073 | + VerticalAlignment="Center" |
| 2074 | + Stroke="Transparent" /> |
| 2075 | + <Path |
| 2076 | + x:Name="arrow" |
| 2077 | + HorizontalAlignment="Center" |
| 2078 | + VerticalAlignment="Center" |
| 2079 | + Data="M 1,1.5 L 4.5,5 L 8,1.5" |
| 2080 | + SnapsToDevicePixels="false" |
| 2081 | + Stroke="#666" |
| 2082 | + StrokeThickness="1" /> |
| 2083 | + </Grid> |
2072 | 2084 | </Grid>
|
2073 | 2085 | </Border>
|
2074 | 2086 | <ControlTemplate.Triggers>
|
|
2077 | 2089 | </Trigger>
|
2078 | 2090 | <Trigger Property="IsMouseOver" Value="true">
|
2079 | 2091 | <Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
2080 |
| - <Setter TargetName="arrow" Property="Stroke" Value="#222" /> |
| 2092 | + <Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color05B}" /> |
2081 | 2093 | </Trigger>
|
2082 | 2094 | <Trigger Property="IsPressed" Value="true">
|
2083 | 2095 | <Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
2084 | 2096 | <Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
2085 |
| - <Setter TargetName="arrow" Property="Stroke" Value="#FF003366" /> |
| 2097 | + <Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color17B}" /> |
2086 | 2098 | </Trigger>
|
2087 | 2099 | </ControlTemplate.Triggers>
|
2088 | 2100 | </ControlTemplate>
|
|
2110 | 2122 | x:Name="HeaderSite"
|
2111 | 2123 | MinWidth="0"
|
2112 | 2124 | MinHeight="0"
|
2113 |
| - Margin="18,0,0,0" |
| 2125 | + Margin="18,0,18,0" |
2114 | 2126 | Padding="{TemplateBinding Padding}"
|
2115 | 2127 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
2116 | 2128 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
2127 | 2139 | Foreground="{TemplateBinding Foreground}"
|
2128 | 2140 | IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
2129 | 2141 | Style="{StaticResource ExpanderDownHeaderStyle}" />
|
2130 |
| - <ContentPresenter |
2131 |
| - x:Name="ExpandSite" |
2132 |
| - Margin="{TemplateBinding Padding}" |
2133 |
| - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
2134 |
| - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
2135 |
| - DockPanel.Dock="Bottom" |
2136 |
| - Focusable="false" |
2137 |
| - Visibility="Collapsed" /> |
| 2142 | + <Border x:Name="ContentPresenterBorder"> |
| 2143 | + <ContentPresenter |
| 2144 | + x:Name="ExpandSite" |
| 2145 | + Margin="{TemplateBinding Padding}" |
| 2146 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 2147 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 2148 | + DockPanel.Dock="Bottom" |
| 2149 | + Focusable="false" /> |
| 2150 | + <Border.LayoutTransform> |
| 2151 | + <ScaleTransform ScaleY="0" /> |
| 2152 | + </Border.LayoutTransform> |
| 2153 | + </Border> |
2138 | 2154 | </DockPanel>
|
2139 | 2155 | </Border>
|
2140 | 2156 | <ControlTemplate.Triggers>
|
2141 | 2157 | <Trigger Property="IsExpanded" Value="true">
|
2142 | 2158 | <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
|
| 2159 | + <Setter TargetName="ContentPresenterBorder" Property="BorderThickness" Value="0,1,0,0" /> |
| 2160 | + <Trigger.EnterActions> |
| 2161 | + <BeginStoryboard> |
| 2162 | + <Storyboard> |
| 2163 | + <DoubleAnimation |
| 2164 | + Storyboard.TargetName="ContentPresenterBorder" |
| 2165 | + Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)" |
| 2166 | + From="0.0" |
| 2167 | + To="1.0" |
| 2168 | + Duration="00:00:00.00" /> |
| 2169 | + <DoubleAnimation |
| 2170 | + Storyboard.TargetName="ContentPresenterBorder" |
| 2171 | + Storyboard.TargetProperty="(Border.Opacity)" |
| 2172 | + From="0.0" |
| 2173 | + To="1.0" |
| 2174 | + Duration="00:00:00.00" /> |
| 2175 | + </Storyboard> |
| 2176 | + </BeginStoryboard> |
| 2177 | + </Trigger.EnterActions> |
| 2178 | + <Trigger.ExitActions> |
| 2179 | + <BeginStoryboard> |
| 2180 | + <Storyboard> |
| 2181 | + <DoubleAnimation |
| 2182 | + Storyboard.TargetName="ContentPresenterBorder" |
| 2183 | + Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)" |
| 2184 | + From="1.0" |
| 2185 | + To="0" |
| 2186 | + Duration="00:00:00.00" /> |
| 2187 | + <!-- Animation 00:00:00.167 --> |
| 2188 | + <DoubleAnimation |
| 2189 | + Storyboard.TargetName="ContentPresenterBorder" |
| 2190 | + Storyboard.TargetProperty="(Border.Opacity)" |
| 2191 | + From="1.0" |
| 2192 | + To="0.0" |
| 2193 | + Duration="00:00:00.00" /> |
| 2194 | + <!-- Animation 00:00:00.167 --> |
| 2195 | + </Storyboard> |
| 2196 | + </BeginStoryboard> |
| 2197 | + </Trigger.ExitActions> |
2143 | 2198 | </Trigger>
|
2144 | 2199 | <Trigger Property="ExpandDirection" Value="Right">
|
2145 | 2200 | <Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
|
|
0 commit comments