Files
ShrlAlgoToolkit/Melskin/Controls/SplashWindow/SplashWindow.xaml

111 lines
6.0 KiB
Plaintext
Raw Normal View History

2025-08-12 23:08:54 +08:00
<Window
AllowsTransparency="True"
Background="Transparent"
InputMethod.IsInputMethodEnabled="False"
RenderOptions.BitmapScalingMode="Fant"
ResizeMode="NoResize"
ShowInTaskbar="False"
SizeToContent="WidthAndHeight"
Style="{x:Null}"
2026-01-02 17:30:30 +08:00
Title="Splash"
2025-08-12 23:08:54 +08:00
WindowStartupLocation="CenterScreen"
WindowStyle="None"
2026-01-02 17:30:30 +08:00
d:Opacity="1"
mc:Ignorable="d"
2026-01-02 17:30:41 +08:00
x:Class="Melskin.Controls.SplashWindow"
2026-01-02 17:30:30 +08:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2026-01-02 17:30:41 +08:00
xmlns:controls="clr-namespace:Melskin.Controls"
2026-01-02 17:30:30 +08:00
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">
2025-08-12 23:08:54 +08:00
<Window.Resources>
<ResourceDictionary>
2026-01-02 17:30:30 +08:00
<Storyboard Completed="Start_Completed" x:Key="Start">
2025-08-12 23:08:54 +08:00
<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>
2026-01-02 17:30:30 +08:00
<Storyboard Completed="End_Completed" x:Key="End">
2025-08-12 23:08:54 +08:00
<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}"
2025-08-12 23:08:54 +08:00
HorizontalAlignment="Center"
2026-01-02 17:30:30 +08:00
Name="viewbox"
RenderTransformOrigin="0.5,0.5"
VerticalAlignment="Center">
2025-08-12 23:08:54 +08:00
<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}">
2025-08-12 23:08:54 +08:00
<Image Source="{Binding ImageUri}" />
</controls:Border>
2025-08-12 23:08:54 +08:00
</Grid>
</Viewbox>
</Grid>
</Window>