<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>