-
Notifications
You must be signed in to change notification settings - Fork 94
/
MainWindow.xaml
106 lines (99 loc) · 4.84 KB
/
MainWindow.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<Window x:Class="BabySmash.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BabySmash"
Title="Baby Smash by Scott Hanselman - http://www.hanselman.com/babysmash"
Height="500" Width="500" WindowStyle="None" HorizontalAlignment="Center" VerticalAlignment="Center"
AllowsTransparency="True">
<Window.Resources>
<Storyboard x:Key="Timeline1" Timeline.DesiredFrameRate="10">
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever"
AutoReverse="True" Storyboard.TargetName="UpdateGlow"
Storyboard.TargetProperty="GlowColor" >
<SplineColorKeyFrame Value="#FFCDCDCD" KeyTime="00:00:00"/>
<SplineColorKeyFrame Value="#FFB92121" KeyTime="00:00:01"/>
<SplineColorKeyFrame Value="#FF2921B9" KeyTime="00:00:02"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.CommandBindings>
<CommandBinding Command="Properties" Executed="Properties_Executed"/>
</Window.CommandBindings>
<Window.InputBindings>
<KeyBinding Gesture="CTRL+ALT+SHIFT+O" Command="{x:Static ApplicationCommands.Properties}" />
</Window.InputBindings>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
</EventTrigger>
<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
</Window.Triggers>
<!--<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard RepeatBehavior="Forever">
<ColorAnimation
AutoReverse="True"
Duration="0:0:9"
From="#00822121"
Storyboard.TargetName="GradientStop1"
Storyboard.TargetProperty="Color"
Timeline.DesiredFrameRate="10"
To="#FFFFFFFF"/>
<ColorAnimation
AutoReverse="True"
Duration="0:0:9"
From="AntiqueWhite"
Storyboard.TargetName="GradientStop2"
Storyboard.TargetProperty="Color"
Timeline.DesiredFrameRate="10"
To="LightCoral"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Window.Triggers>
<Window.Background>
<RadialGradientBrush>
<RadialGradientBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform
CenterX="0.5"
CenterY="0.5"
ScaleX="1.15"
ScaleY="1.15"/>
<TranslateTransform X="-0.08" Y="-0.08"/>
</TransformGroup>
</RadialGradientBrush.RelativeTransform>
<GradientStop x:Name="GradientStop1" Offset="0" Color="#0095B1FF"/>
<GradientStop x:Name="GradientStop2" Offset="1" Color="#FF719300"/>
</RadialGradientBrush>
</Window.Background>-->
<Grid Name="mainGrid">
<StackPanel>
<TextBlock x:Name="infoLabel" Margin="15,15,0,0" FontSize="12" Visibility="Hidden">
<TextBlock.BitmapEffect>
<BitmapEffectGroup>
<OuterGlowBitmapEffect GlowColor="Yellow" GlowSize="3"/>
</BitmapEffectGroup>
</TextBlock.BitmapEffect>
<Bold>BabySmash!</Bold> by Scott Hanselman <Italic>with community contributions!</Italic> - http://www.babysmash.com
<LineBreak/>
<Bold>Ctrl-Shift-Alt-O</Bold> for options, <Bold>ALT-F4</Bold> to exit
</TextBlock>
<TextBlock x:Name="UpdateAvailableLabel" Visibility="Hidden" Margin="15,10,0,0" FontSize="12">
<TextBlock.BitmapEffect>
<BitmapEffectGroup>
<OuterGlowBitmapEffect x:Name="UpdateGlow" GlowColor="Red" GlowSize="3"/>
</BitmapEffectGroup>
</TextBlock.BitmapEffect>
<Bold>Updating BabySmash in the background...</Bold>
<ProgressBar HorizontalAlignment="Left" x:Name="updateProgress" Value="0" Minimum="0" Maximum="100" Margin="0,0,0,0" Height="10" Width="130"/>
</TextBlock>
</StackPanel>
<Canvas Name="figuresCanvas"/>
<Canvas Name="mouseDragCanvas"/>
<Canvas Name="mouseCursorCanvas"/>
</Grid>
</Window>