|
70 | 70 | <Setter Property="Focusable" Value="False"/>
|
71 | 71 | <Setter Property="Width" Value="16"/>
|
72 | 72 | <Setter Property="Height" Value="16"/>
|
| 73 | + <Setter Property="Background" Value="Transparent"/> |
73 | 74 | <Setter Property="Template">
|
74 | 75 | <Setter.Value>
|
75 | 76 | <ControlTemplate TargetType="{x:Type ToggleButton}">
|
76 |
| - <Border Background="Transparent" Height="16" Width="16"> |
| 77 | + <Border Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"> |
77 | 78 | <VisualStateManager.VisualStateGroups>
|
78 | 79 | <VisualStateGroup x:Name="CheckStates">
|
79 | 80 | <VisualStateGroup.Transitions>
|
|
162 | 163 | <Setter Property="Padding" Value="8" />
|
163 | 164 | <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignTreeViewItemFocusVisual}"/>
|
164 | 165 | <Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}"/>
|
| 166 | + <Setter Property="wpf:TreeViewAssist.ExpanderSize" Value="16"/> |
| 167 | + <Setter Property="wpf:TreeViewAssist.ShowSelection" Value="True"/> |
165 | 168 | <Setter Property="Template">
|
166 | 169 | <Setter.Value>
|
167 | 170 | <ControlTemplate TargetType="{x:Type TreeViewItem}">
|
|
177 | 180 | <RowDefinition/>
|
178 | 181 | </Grid.RowDefinitions>
|
179 | 182 | <VisualStateManager.VisualStateGroups>
|
180 |
| - <VisualStateGroup Name="CommonStates"> |
| 183 | + <VisualStateGroup Name="CommonStates" > |
181 | 184 | <VisualStateGroup.Transitions>
|
182 | 185 | <VisualTransition GeneratedDuration="0:0:0.3" To="Normal">
|
183 | 186 | <VisualTransition.GeneratedEasingFunction>
|
|
200 | 203 | <VisualStateGroup.Transitions>
|
201 | 204 | <VisualTransition GeneratedDuration="0:0:0.6"/>
|
202 | 205 | </VisualStateGroup.Transitions>
|
203 |
| - <VisualState Name="Selected"> |
| 206 | + <VisualState Name="Selected" > |
204 | 207 | <Storyboard>
|
205 | 208 | <DoubleAnimation Storyboard.TargetName="SelectedBorder"
|
206 | 209 | Storyboard.TargetProperty="Opacity"
|
|
261 | 264 | Style="{StaticResource MaterialDesignExpandCollapseToggleStyle}"
|
262 | 265 | Foreground="{TemplateBinding Foreground}"
|
263 | 266 | Margin="8 0 8 0"
|
264 |
| - VerticalAlignment="Center" |
265 |
| - /> |
| 267 | + Width="{TemplateBinding wpf:TreeViewAssist.ExpanderSize}" |
| 268 | + Height="{TemplateBinding wpf:TreeViewAssist.ExpanderSize}" |
| 269 | + VerticalAlignment="Center"/> |
266 | 270 |
|
267 | 271 | <Border x:Name="MouseOverBorder"
|
268 | 272 | Grid.Column="1" Grid.ColumnSpan="2"
|
|
278 | 282 |
|
279 | 283 | <Grid Grid.Column="1" Grid.ColumnSpan="2" x:Name="ContentGrid" Background="{TemplateBinding Background}">
|
280 | 284 | <wpf:Ripple Feedback="{TemplateBinding Foreground, Converter={StaticResource BrushRoundConverter}}"
|
| 285 | + x:Name="Ripple" |
281 | 286 | Focusable="False"
|
282 | 287 | SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
283 | 288 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
326 | 331 | <Trigger Property="IsEnabled" Value="false">
|
327 | 332 | <Setter Property="Opacity" Value=".56"/>
|
328 | 333 | </Trigger>
|
| 334 | + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:TreeViewAssist.ShowSelection)}" Value="False"> |
| 335 | + <Setter TargetName="MouseOverBorder" Property="Visibility" Value="Collapsed"/> |
| 336 | + <Setter TargetName="SelectedBorder" Property="Visibility" Value="Collapsed"/> |
| 337 | + <Setter TargetName="Ripple" Property="Feedback" Value="Transparent"/> |
| 338 | + </DataTrigger> |
329 | 339 | </ControlTemplate.Triggers>
|
330 | 340 | </ControlTemplate>
|
331 | 341 | </Setter.Value>
|
|
0 commit comments