-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
MaterialDesignTheme.GridSplitter.xaml
48 lines (48 loc) · 2.78 KB
/
MaterialDesignTheme.GridSplitter.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="MaterialDesignGridSplitterPreview">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Fill="{DynamicResource MaterialDesignSelection}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="MaterialDesignGridSplitter" TargetType="{x:Type GridSplitter}">
<Setter Property="Background" Value="{DynamicResource MaterialDesignDivider}"/>
<Setter Property="PreviewStyle" Value="{StaticResource MaterialDesignGridSplitterPreview}"/>
<Setter Property="Opacity" Value=".56"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GridSplitter}">
<ControlTemplate.Resources>
<Storyboard x:Key="MouseEnter">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="0" Value="0.56"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="MouseExit">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="0" Value="0.56"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.56"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.ExitActions>
<BeginStoryboard x:Name="MouseExit_BeginStoryboard" Storyboard="{StaticResource MouseExit}"/>
</Trigger.ExitActions>
<Trigger.EnterActions>
<BeginStoryboard x:Name="MouseEnter_BeginStoryboard" Storyboard="{StaticResource MouseEnter}"/>
</Trigger.EnterActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>