-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFloatingWindow.xaml
60 lines (60 loc) · 3.31 KB
/
FloatingWindow.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
49
50
51
52
53
54
55
56
57
58
59
60
<Window x:Class="WinMediaPie.FloatingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:WinMediaPie"
mc:Ignorable="d"
Topmost="True"
WindowStyle="None"
ResizeMode="NoResize"
WindowStartupLocation="Manual"
AllowsTransparency="True"
Title="FloatingWindow" Width="60" Height="90">
<Grid TouchDown="TogglePie" MouseDown="TogglePie">
<Grid.Background>
<SolidColorBrush Color="#FFB0B0B0" Opacity="0.075"/>
</Grid.Background>
<Grid.Triggers>
<EventTrigger RoutedEvent="Grid.MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="expand">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.9"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="expand">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.9"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Grid.MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="expand">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="expand">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Grid.Triggers>
<iconPacks:PackIconMaterial x:Name="expand" Opacity="0.5" Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Center" Kind="ChevronLeft">
<iconPacks:PackIconMaterial.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</iconPacks:PackIconMaterial.RenderTransform>
</iconPacks:PackIconMaterial>
</Grid>
<Window.Background>
<SolidColorBrush Color="#FFB0B0B0"
Opacity="0.0" />
</Window.Background>
</Window>