Window Class WpfAnimation MainWindow xmlns http schemas microsoft com

  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
<Window x:Class="WpfAnimation.MainWindow"
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:local="clr-namespace:WpfAnimation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="Анимация в WPF"
Height="500"
Width="884.95"
Style="{StaticResource WindowStyle}">
<Grid Background="White">
<StackPanel Background="#FFEBEBEB" Width="240" HorizontalAlignment="Left" Panel.ZIndex="100" Margin="0" RenderTransformOrigin="0.5,0.5">
<StackPanel.Effect>
<DropShadowEffect Color="#33000000" RenderingBias="Quality" Opacity="0.3" BlurRadius="4" ShadowDepth="1"/>
</StackPanel.Effect>
<Grid Background="#fff" HorizontalAlignment="Stretch">
<Label HorizontalAlignment="Center" Padding="0,10" FontWeight="Bold">
Выберите действие
</Label>
<Grid.Effect>
<DropShadowEffect Opacity="0.1" ShadowDepth="1" RenderingBias="Quality"/>
</Grid.Effect>
</Grid>
<Border Height="1"></Border>
<Grid
HorizontalAlignment="Stretch"
Margin="0,0,0,15">
<Grid.Effect>
<DropShadowEffect Opacity="0.1" ShadowDepth="1" RenderingBias="Quality"/>
</Grid.Effect>
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" Height="415">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Stretch">
<Button
Click="Button_Click"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Базовая анимация
</Button>
<Button
Click="Button_Click2"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Анимация цвета
</Button>
<Button
Click="Button_Click3"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Анимация по полным кадрам
</Button>
<Button
Click="Button_Click4"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Нелинейная (сплайновая) интерполяция
</Button>
<Button
Click="Button_Click6"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Анимация с использанием пути
</Button>
<Button
Click="SolarSystem"
Foreground="#FF000000" Background="White" BorderThickness="0" Padding="1,9" Cursor="Hand">
Солнечная система
</Button>
</StackPanel>
</ScrollViewer>
</Grid>
</StackPanel>
<!-- Контент -->
<Grid Margin="240,0,0,0">
<Label
x:Name="view1"
Visibility="Hidden"
Template="{StaticResource SimpleAnimationTemplate}">
</Label>
<Label
x:Name="view2"
Visibility="Hidden"
Template="{StaticResource SimpleColorAnimationTemplate}">
</Label>
<Label
x:Name="view3"
Visibility="Hidden"
Template="{StaticResource TargetCadresAnimation}">
</Label>
<Label
x:Name="view4"
Visibility="Hidden"
Template="{StaticResource TargetCadresAnimationSpline}">
</Label>
<Label
x:Name="solar_system"
Visibility="Hidden"
Template="{StaticResource TargetCadresAnimationSolarSystem}">
</Label>
<Label
x:Name="view6"
Visibility="Hidden"
Template="{StaticResource PathAnimation}">
</Label>
</Grid>
</Grid>
</Window>