优化更新代码,添加界面功能并整合
This commit is contained in:
112
WPFluent/Controls/SplashWindow/SplashWindow.xaml
Normal file
112
WPFluent/Controls/SplashWindow/SplashWindow.xaml
Normal file
@@ -0,0 +1,112 @@
|
||||
<Window
|
||||
x:Class="WPFluent.Controls.SplashWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="http://schemas.superdev.ch/valueconverters/2016/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:WPFluent.Controls"
|
||||
xmlns:layout="clr-namespace:WPFluent.Layout"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="Splash"
|
||||
d:Opacity="1"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
RenderOptions.BitmapScalingMode="Fant"
|
||||
ResizeMode="NoResize"
|
||||
ShowInTaskbar="False"
|
||||
SizeToContent="WidthAndHeight"
|
||||
Style="{x:Null}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<Storyboard x:Key="Start" Completed="Start_Completed">
|
||||
<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 x:Key="End" Completed="End_Completed">
|
||||
<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
|
||||
Name="viewbox"
|
||||
Height="{x:Static local:SplashConfig.ImageHeight}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
RenderTransformOrigin="0.5,0.5">
|
||||
<UIElement.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform />
|
||||
<SkewTransform />
|
||||
<RotateTransform />
|
||||
<TranslateTransform />
|
||||
</TransformGroup>
|
||||
</UIElement.RenderTransform>
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<layout:Border ClipToBounds="True" CornerRadius="{x:Static local:SplashConfig.CornerRadius}">
|
||||
<Image Source="{Binding ImageUri}" />
|
||||
</layout:Border>
|
||||
</Grid>
|
||||
</Viewbox>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user