|
12 | 12 | BorderThickness="{TemplateBinding BorderThickness}"> |
13 | 13 | <Grid Background="Transparent" SnapsToDevicePixels="False"> |
14 | 14 | <Grid.ColumnDefinitions> |
15 | | - <ColumnDefinition Width="*" /> |
16 | 15 | <ColumnDefinition Width="Auto" /> |
| 16 | + <ColumnDefinition Width="*" /> |
17 | 17 | </Grid.ColumnDefinitions> |
18 | | - <Rectangle Grid.Column="1" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" VerticalAlignment="Center"> |
| 18 | + <Rectangle Grid.Column="0" x:Name="Chevron" Width="20" Height="20" Fill="{DynamicResource GrayBrush3}" VerticalAlignment="Center"> |
19 | 19 | <Rectangle.OpacityMask> |
20 | 20 | <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ChevronDown}" /> |
21 | 21 | </Rectangle.OpacityMask> |
22 | 22 | </Rectangle> |
23 | | - <Controls:ContentControlEx Grid.Column="0" |
24 | | - Margin="0" |
| 23 | + <Controls:ContentControlEx Grid.Column="1" |
| 24 | + Margin="10,0,0,0" |
25 | 25 | HorizontalAlignment="Stretch" |
26 | 26 | Padding="{TemplateBinding Padding}" |
27 | 27 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
55 | 55 |
|
56 | 56 | <Style x:Key="DefaultExpander" TargetType="{x:Type Expander}" BasedOn="{StaticResource MetroExpander}"> |
57 | 57 | <Setter Property="BorderThickness" Value="0" /> |
| 58 | + <Setter Property="Padding" Value="0" /> |
58 | 59 | <Setter Property="Background" Value="Transparent" /> |
59 | 60 | <Setter Property="Controls:GroupBoxHelper.HeaderForeground" Value="{DynamicResource GrayBrush3}" /> |
60 | 61 | <Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal" /> |
61 | 62 | <Setter Property="Controls:ExpanderHelper.HeaderDownStyle" Value="{DynamicResource ExpanderDownHeader}" /> |
62 | 63 | </Style> |
63 | 64 |
|
| 65 | + <Style x:Key="ExpanderDownHeaderReverse" BasedOn="{StaticResource ExpanderDownHeaderStyle}" TargetType="{x:Type ToggleButton}"> |
| 66 | + <Setter Property="Template"> |
| 67 | + <Setter.Value> |
| 68 | + <ControlTemplate TargetType="{x:Type ToggleButton}"> |
| 69 | + <Border Padding="{TemplateBinding Padding}" |
| 70 | + Background="{TemplateBinding Background}" |
| 71 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 72 | + BorderThickness="{TemplateBinding BorderThickness}"> |
| 73 | + <Grid Background="Transparent" SnapsToDevicePixels="False"> |
| 74 | + <Grid.ColumnDefinitions> |
| 75 | + <ColumnDefinition Width="*" /> |
| 76 | + <ColumnDefinition Width="Auto" /> |
| 77 | + </Grid.ColumnDefinitions> |
| 78 | + <Controls:ContentControlEx Grid.Column="0" |
| 79 | + Margin="0,0,10,0" |
| 80 | + HorizontalAlignment="Stretch" |
| 81 | + Padding="{TemplateBinding Padding}" |
| 82 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 83 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 84 | + Content="{TemplateBinding Content}" |
| 85 | + ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Controls:ControlsHelper.ContentCharacterCasing)}" |
| 86 | + ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| 87 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 88 | + ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" |
| 89 | + RecognizesAccessKey="True" |
| 90 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"> |
| 91 | + </Controls:ContentControlEx> |
| 92 | + <Rectangle Grid.Column="1" x:Name="Chevron" Width="20" Height="20" Fill="{DynamicResource GrayBrush3}" VerticalAlignment="Center"> |
| 93 | + <Rectangle.OpacityMask> |
| 94 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ChevronDown}" /> |
| 95 | + </Rectangle.OpacityMask> |
| 96 | + </Rectangle> |
| 97 | + </Grid> |
| 98 | + </Border> |
| 99 | + <ControlTemplate.Triggers> |
| 100 | + <Trigger Property="IsChecked" Value="True"> |
| 101 | + <Setter TargetName="Chevron" Property="OpacityMask"> |
| 102 | + <Setter.Value> |
| 103 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ChevronUp}" /> |
| 104 | + </Setter.Value> |
| 105 | + </Setter> |
| 106 | + </Trigger> |
| 107 | + <Trigger Property="IsMouseOver" Value="True"> |
| 108 | + <Setter TargetName="Chevron" Property="Fill" Value="{DynamicResource GrayBrush5}"/> |
| 109 | + </Trigger> |
| 110 | + </ControlTemplate.Triggers> |
| 111 | + </ControlTemplate> |
| 112 | + </Setter.Value> |
| 113 | + </Setter> |
| 114 | + </Style> |
| 115 | + |
| 116 | + <Style x:Key="HeaderExpander" TargetType="{x:Type Expander}" BasedOn="{StaticResource MetroExpander}"> |
| 117 | + <Setter Property="BorderThickness" Value="0" /> |
| 118 | + <Setter Property="Margin" Value="-4" /> |
| 119 | + <Setter Property="Background" Value="Transparent" /> |
| 120 | + <Setter Property="Controls:GroupBoxHelper.HeaderForeground" Value="{DynamicResource GrayBrush3}" /> |
| 121 | + <Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal" /> |
| 122 | + <Setter Property="Controls:ExpanderHelper.HeaderDownStyle" Value="{DynamicResource ExpanderDownHeaderReverse}" /> |
| 123 | + </Style> |
| 124 | + |
64 | 125 | <Style x:Key="RightExpanderOpen" BasedOn="{StaticResource ExpanderDownHeaderStyle}" TargetType="{x:Type ToggleButton}"> |
65 | 126 | <Setter Property="Template"> |
66 | 127 | <Setter.Value> |
|
75 | 136 | <ColumnDefinition Width="Auto" /> |
76 | 137 | </Grid.ColumnDefinitions> |
77 | 138 | <TextBlock Grid.Column="0" Text="{TemplateBinding Content}" Style="{StaticResource HeaderTextBlock}" Margin="10,10,10,0" /> |
78 | | - <Rectangle Grid.Column="1" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="0,10,10,0" VerticalAlignment="Center" HorizontalAlignment="Center"> |
| 139 | + <Rectangle Grid.Column="1" x:Name="Chevron" Width="20" Height="20" Fill="{DynamicResource GrayBrush3}" Margin="0,10,10,0" VerticalAlignment="Center" HorizontalAlignment="Center"> |
79 | 140 | <Rectangle.OpacityMask> |
80 | 141 | <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ChevronLeft}" /> |
81 | 142 | </Rectangle.OpacityMask> |
|
105 | 166 | <RowDefinition Height="Auto" /> |
106 | 167 | <RowDefinition Height="*" /> |
107 | 168 | </Grid.RowDefinitions> |
108 | | - <Rectangle Grid.Row="0" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="10,16.5,10,10" VerticalAlignment="Center" HorizontalAlignment="Center"> |
| 169 | + <Rectangle Grid.Row="0" x:Name="Chevron" Width="20" Height="20" Fill="{DynamicResource GrayBrush3}" Margin="10,14.5,10,10" VerticalAlignment="Center" HorizontalAlignment="Center"> |
109 | 170 | <Rectangle.OpacityMask> |
110 | 171 | <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ChevronRight}" /> |
111 | 172 | </Rectangle.OpacityMask> |
|
126 | 187 | </Setter.Value> |
127 | 188 | </Setter> |
128 | 189 | </Style> |
129 | | - |
| 190 | + |
130 | 191 | <Style x:Key="RightExpander" TargetType="{x:Type Expander}" BasedOn="{StaticResource MetroExpander}"> |
131 | 192 | <Setter Property="BorderThickness" Value="0" /> |
132 | 193 | <Setter Property="Background" Value="Transparent" /> |
|
0 commit comments