|
|
@@ -0,0 +1,257 @@
|
|
|
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
+ <ControlTemplate
|
|
|
+ TargetType="{x:Type ToggleButton}"
|
|
|
+ x:Key="ExpanderToggleButton">
|
|
|
+ <Grid>
|
|
|
+ <Border
|
|
|
+ Name="CollapsedArrow"
|
|
|
+ Width="48"
|
|
|
+ Height="48"
|
|
|
+ Background="#00FFFFFF">
|
|
|
+ <Path
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Fill="{DynamicResource Brush.Text}"
|
|
|
+ Data="{DynamicResource Icon.CaretDown}" />
|
|
|
+ </Border>
|
|
|
+ <Border
|
|
|
+ Name="ExpandedArrow"
|
|
|
+ Width="48"
|
|
|
+ Height="48"
|
|
|
+ Background="#00FFFFFF"
|
|
|
+ Visibility="Collapsed">
|
|
|
+ <Path
|
|
|
+ Margin="0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Fill="{DynamicResource Brush.Text}"
|
|
|
+ Data="{DynamicResource Icon.CaretUp}" />
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger
|
|
|
+ Property="ToggleButton.IsChecked"
|
|
|
+ Value="True">
|
|
|
+ <Setter
|
|
|
+ TargetName="CollapsedArrow"
|
|
|
+ Property="Visibility"
|
|
|
+ Value="Hidden" />
|
|
|
+ <Setter
|
|
|
+ TargetName="ExpandedArrow"
|
|
|
+ Property="Visibility"
|
|
|
+ Value="Visible" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ <ControlTemplate
|
|
|
+ TargetType="{x:Type ToggleButton}"
|
|
|
+ x:Key="ExpanderToggleButtonRecipeInfo">
|
|
|
+ <Grid
|
|
|
+ Margin="0,-25,0,0">
|
|
|
+ <Border
|
|
|
+ Name="CollapsedArrow"
|
|
|
+ Width="150"
|
|
|
+ Height="100"
|
|
|
+ Background="#00FFFFFF">
|
|
|
+ <Path
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Fill="{DynamicResource Brush.Text}"
|
|
|
+ Data="{DynamicResource Icon.CaretDown}" />
|
|
|
+ </Border>
|
|
|
+ <Border
|
|
|
+ Name="ExpandedArrow"
|
|
|
+ Width="150"
|
|
|
+ Height="100"
|
|
|
+ Background="#00FFFFFF"
|
|
|
+ Visibility="Collapsed">
|
|
|
+ <Path
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Fill="{DynamicResource Brush.Text}"
|
|
|
+ Data="{DynamicResource Icon.CaretUp}" />
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger
|
|
|
+ Property="ToggleButton.IsChecked"
|
|
|
+ Value="True">
|
|
|
+ <Setter
|
|
|
+ TargetName="CollapsedArrow"
|
|
|
+ Property="Visibility"
|
|
|
+ Value="Hidden" />
|
|
|
+ <Setter
|
|
|
+ TargetName="ExpandedArrow"
|
|
|
+ Property="Visibility"
|
|
|
+ Value="Visible" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ <Style
|
|
|
+ TargetType="{x:Type Expander}"
|
|
|
+ x:Key="Expander.Base">
|
|
|
+ <Setter
|
|
|
+ Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate
|
|
|
+ TargetType="{x:Type Expander}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition
|
|
|
+ Height="Auto" />
|
|
|
+ <RowDefinition
|
|
|
+ Name="ContentRow"
|
|
|
+ Height="0" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Border
|
|
|
+ Name="Border"
|
|
|
+ Grid.Row="0"
|
|
|
+ BorderThickness="0"
|
|
|
+ Background="{DynamicResource Brush.Background}"
|
|
|
+ CornerRadius="3">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition
|
|
|
+ Height="Auto" />
|
|
|
+ <RowDefinition
|
|
|
+ Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition
|
|
|
+ Width="*" />
|
|
|
+ <ColumnDefinition
|
|
|
+ Width="Auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <ContentPresenter
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ Margin="4"
|
|
|
+ ContentSource="Header"
|
|
|
+ RecognizesAccessKey="True" />
|
|
|
+ <ToggleButton
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="48"
|
|
|
+ Height="48"
|
|
|
+ Margin="0,16,16,0"
|
|
|
+ OverridesDefaultStyle="True"
|
|
|
+ Template="{StaticResource ExpanderToggleButton}"
|
|
|
+ IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <Border
|
|
|
+ Name="Content"
|
|
|
+ Grid.Row="1"
|
|
|
+ BorderThickness="0"
|
|
|
+ Background="{DynamicResource Brush.Background}"
|
|
|
+ CornerRadius="3 0 0 3">
|
|
|
+ <ContentPresenter
|
|
|
+ Margin="4" />
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger
|
|
|
+ Property="Expander.IsExpanded"
|
|
|
+ Value="True">
|
|
|
+ <Setter
|
|
|
+ TargetName="Border"
|
|
|
+ Property="Border.CornerRadius"
|
|
|
+ Value="3 0 0 3" />
|
|
|
+ <Setter
|
|
|
+ TargetName="ContentRow"
|
|
|
+ Property="Height"
|
|
|
+ Value="Auto" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <Style
|
|
|
+ BasedOn="{StaticResource Expander.Base}"
|
|
|
+ TargetType="{x:Type Expander}"
|
|
|
+ x:Key="{x:Type Expander}" />
|
|
|
+ <Style
|
|
|
+ TargetType="{x:Type Expander}"
|
|
|
+ x:Key="Style.ExpanderRecipeInfo">
|
|
|
+ <Setter
|
|
|
+ Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate
|
|
|
+ TargetType="{x:Type Expander}">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition
|
|
|
+ Height="Auto" />
|
|
|
+ <RowDefinition
|
|
|
+ Name="ContentRow"
|
|
|
+ Height="0" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Border
|
|
|
+ Name="Border"
|
|
|
+ Grid.Row="0"
|
|
|
+ BorderThickness="1"
|
|
|
+ Background="{DynamicResource Brush.Overlay3Percent}"
|
|
|
+ CornerRadius="3">
|
|
|
+ <Grid
|
|
|
+ Margin="0,10,0,10">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition
|
|
|
+ Height="Auto" />
|
|
|
+ <RowDefinition
|
|
|
+ Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition
|
|
|
+ Width="*" />
|
|
|
+ <ColumnDefinition
|
|
|
+ Width="100" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <ContentPresenter
|
|
|
+ Grid.RowSpan="1"
|
|
|
+ Margin="0"
|
|
|
+ ContentSource="Header"
|
|
|
+ RecognizesAccessKey="True" />
|
|
|
+ <ToggleButton
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="200"
|
|
|
+ Height="40"
|
|
|
+ Margin="0,-10,0,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ BorderBrush="#00FFFFFF"
|
|
|
+ OverridesDefaultStyle="True"
|
|
|
+ Template="{DynamicResource ExpanderToggleButtonRecipeInfo}"
|
|
|
+ IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <Border
|
|
|
+ Name="Content"
|
|
|
+ Grid.Row="1"
|
|
|
+ Background="#00FFFFFF"
|
|
|
+ BorderThickness="0"
|
|
|
+ CornerRadius="3 0 0 3">
|
|
|
+ <ContentPresenter
|
|
|
+ Margin="4" />
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger
|
|
|
+ Property="Expander.IsExpanded"
|
|
|
+ Value="True">
|
|
|
+ <Setter
|
|
|
+ TargetName="Border"
|
|
|
+ Property="Border.CornerRadius"
|
|
|
+ Value="0 3 3 0" />
|
|
|
+ <Setter
|
|
|
+ TargetName="ContentRow"
|
|
|
+ Property="Height"
|
|
|
+ Value="Auto" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+</ResourceDictionary>
|