功能更新
This commit is contained in:
110
Melskin/Controls/SplashWindow/SplashWindow.xaml
Normal file
110
Melskin/Controls/SplashWindow/SplashWindow.xaml
Normal file
@@ -0,0 +1,110 @@
|
||||
<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="Melskin.Controls.SplashWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:controls="clr-namespace:Melskin.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
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 controls: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">
|
||||
<controls:Border ClipToBounds="True" CornerRadius="{x:Static controls:SplashConfig.CornerRadius}">
|
||||
<Image Source="{Binding ImageUri}" />
|
||||
</controls:Border>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user