|
219 | 219 | </Style>
|
220 | 220 |
|
221 | 221 | <Style x:Key="MaterialDesignExpander" TargetType="{x:Type Expander}">
|
| 222 | + <Setter Property="BorderThickness" Value="0" /> |
222 | 223 | <Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}" />
|
223 | 224 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
224 | 225 | <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
225 | 226 | <Setter Property="VerticalContentAlignment" Value="Top"/>
|
226 | 227 | <Setter Property="Template">
|
227 | 228 | <Setter.Value>
|
228 | 229 | <ControlTemplate TargetType="{x:Type Expander}">
|
229 |
| - <Grid> |
| 230 | + <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
230 | 231 | <VisualStateManager.VisualStateGroups>
|
231 | 232 | <VisualStateGroup x:Name="ExpansionStates">
|
232 | 233 | <VisualStateGroup.Transitions>
|
|
271 | 272 | </VisualState>
|
272 | 273 | </VisualStateGroup>
|
273 | 274 | </VisualStateManager.VisualStateGroups>
|
274 |
| - <DockPanel Background="{TemplateBinding Background}"> |
275 |
| - <ToggleButton Name="HeaderSite" |
276 |
| - DockPanel.Dock="Top" |
277 |
| - BorderThickness="0" Cursor="Hand" |
278 |
| - IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
279 |
| - Style="{StaticResource MaterialDesignExpanderDownHeaderStyle}" |
280 |
| - TextElement.FontSize="15" |
281 |
| - Opacity=".87" |
282 |
| - Foreground="{TemplateBinding Foreground}" |
283 |
| - Content="{TemplateBinding Header}" |
284 |
| - ContentTemplate="{TemplateBinding HeaderTemplate}" |
285 |
| - ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
286 |
| - ContentStringFormat="{TemplateBinding HeaderStringFormat}"/> |
287 |
| - <Border Name="ContentSite" |
288 |
| - DockPanel.Dock="Bottom" > |
289 |
| - <StackPanel Name="ContentPanel" |
290 |
| - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
291 |
| - Margin="{TemplateBinding Padding}" |
292 |
| - VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
293 |
| - <StackPanel.Height> |
294 |
| - <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
295 |
| - <Binding ElementName="PART_Content" Path="ActualHeight"/> |
296 |
| - <Binding ElementName="PART_Content" Path="Opacity"/> |
297 |
| - </MultiBinding> |
298 |
| - </StackPanel.Height> |
299 |
| - <StackPanel.Width> |
300 |
| - <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
301 |
| - <Binding ElementName="PART_Content" Path="ActualWidth"/> |
302 |
| - <Binding ElementName="PART_Content" Path="Opacity"/> |
303 |
| - </MultiBinding> |
304 |
| - </StackPanel.Width> |
305 |
| - <ContentPresenter Name="PART_Content" Focusable="False" |
306 |
| - ContentTemplate="{TemplateBinding ContentTemplate}" |
307 |
| - ContentStringFormat="{TemplateBinding ContentStringFormat}" |
308 |
| - ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/> |
309 |
| - </StackPanel> |
310 |
| - </Border> |
311 |
| - </DockPanel> |
312 |
| - </Grid> |
| 275 | + <Grid> |
| 276 | + <DockPanel Background="{TemplateBinding Background}"> |
| 277 | + <ToggleButton Name="HeaderSite" |
| 278 | + DockPanel.Dock="Top" |
| 279 | + BorderThickness="0" Cursor="Hand" |
| 280 | + IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
| 281 | + Style="{StaticResource MaterialDesignExpanderDownHeaderStyle}" |
| 282 | + TextElement.FontSize="15" |
| 283 | + Opacity=".87" |
| 284 | + Foreground="{TemplateBinding Foreground}" |
| 285 | + Content="{TemplateBinding Header}" |
| 286 | + ContentTemplate="{TemplateBinding HeaderTemplate}" |
| 287 | + ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
| 288 | + ContentStringFormat="{TemplateBinding HeaderStringFormat}"/> |
| 289 | + <Border Name="ContentSite" |
| 290 | + DockPanel.Dock="Bottom" > |
| 291 | + <StackPanel Name="ContentPanel" |
| 292 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 293 | + Margin="{TemplateBinding Padding}" |
| 294 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> |
| 295 | + <StackPanel.Height> |
| 296 | + <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
| 297 | + <Binding ElementName="PART_Content" Path="ActualHeight"/> |
| 298 | + <Binding ElementName="PART_Content" Path="Opacity"/> |
| 299 | + </MultiBinding> |
| 300 | + </StackPanel.Height> |
| 301 | + <StackPanel.Width> |
| 302 | + <MultiBinding Converter="{StaticResource MathMlpMultipleConverter}"> |
| 303 | + <Binding ElementName="PART_Content" Path="ActualWidth"/> |
| 304 | + <Binding ElementName="PART_Content" Path="Opacity"/> |
| 305 | + </MultiBinding> |
| 306 | + </StackPanel.Width> |
| 307 | + <ContentPresenter Name="PART_Content" Focusable="False" |
| 308 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 309 | + ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| 310 | + ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/> |
| 311 | + </StackPanel> |
| 312 | + </Border> |
| 313 | + </DockPanel> |
| 314 | + </Grid> |
| 315 | + </Border> |
313 | 316 | <ControlTemplate.Triggers>
|
314 | 317 | <Trigger Property="ExpandDirection" Value="Right">
|
315 | 318 | <Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
|
|
0 commit comments