111 lines
6.0 KiB
XML
111 lines
6.0 KiB
XML
<Window
|
|
AllowsTransparency="True"
|
|
Background="Transparent"
|
|
InputMethod.IsInputMethodEnabled="False"
|
|
RenderOptions.BitmapScalingMode="Fant"
|
|
ResizeMode="NoResize"
|
|
ShowInTaskbar="False"
|
|
SizeToContent="WidthAndHeight"
|
|
Style="{x:Null}"
|
|
Title="Splash"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowStyle="None"
|
|
d:Opacity="1"
|
|
mc:Ignorable="d"
|
|
x:Class="WPFluent.Controls.SplashWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:WPFluent.Controls"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<Storyboard Completed="Start_Completed" x:Key="Start">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0.8" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="0.9">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="0.9" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0.8" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0.8" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="0.9">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="0.9" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="1">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
<Storyboard Completed="End_Completed" x:Key="End">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0.9" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="0.9" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="viewbox" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="1" />
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0">
|
|
<EasingDoubleKeyFrame.EasingFunction>
|
|
<PowerEase EasingMode="EaseOut" Power="3" />
|
|
</EasingDoubleKeyFrame.EasingFunction>
|
|
</EasingDoubleKeyFrame>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
<Window.Triggers>
|
|
<EventTrigger RoutedEvent="Loaded">
|
|
<BeginStoryboard Storyboard="{StaticResource Start}" />
|
|
</EventTrigger>
|
|
</Window.Triggers>
|
|
<Grid>
|
|
<Viewbox
|
|
Height="{x:Static local:SplashConfig.ImageHeight}"
|
|
HorizontalAlignment="Center"
|
|
Name="viewbox"
|
|
RenderTransformOrigin="0.5,0.5"
|
|
VerticalAlignment="Center">
|
|
<UIElement.RenderTransform>
|
|
<TransformGroup>
|
|
<ScaleTransform />
|
|
<SkewTransform />
|
|
<RotateTransform />
|
|
<TranslateTransform />
|
|
</TransformGroup>
|
|
</UIElement.RenderTransform>
|
|
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<local:Border ClipToBounds="True" CornerRadius="{x:Static local:SplashConfig.CornerRadius}">
|
|
<Image Source="{Binding ImageUri}" />
|
|
</local:Border>
|
|
</Grid>
|
|
</Viewbox>
|
|
</Grid>
|
|
</Window>
|