- Fluent Design 风格 UI,深色/浅色主题切换 - 平滑过渡动画(页面切换、按钮交互、状态变化) - 五大核心功能:安装管理、墨迹管理、格式转换、触摸设置、激活管理 - 基于 dotnetCampus.EasiPlugin.Sdk v2.1.1-alpha.3 插件框架 - WPF 安装向导(欢迎页 -> 安装页 -> 完成页)
423 lines
21 KiB
XML
423 lines
21 KiB
XML
<!--
|
||
CompletePage.xaml - Better-Seewo 安装向导完成页面
|
||
显示安装成功图标、安装摘要和操作按钮
|
||
带成功图标弹出动画和元素交错淡入
|
||
作者:雾启工作室
|
||
-->
|
||
|
||
<Page x:Class="Better_Seewo.Installer.Pages.CompletePage"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
Background="Transparent">
|
||
|
||
<!-- ===== 页面入场动画 ===== -->
|
||
<Page.Triggers>
|
||
<EventTrigger RoutedEvent="Page.Loaded">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<!-- 成功图标弹出动画:Scale 0 -> 1.2 -> 1.0 -->
|
||
<DoubleAnimation Storyboard.TargetName="SuccessIconPanel"
|
||
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
From="0" To="1.2"
|
||
Duration="0:0:0.400">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetName="SuccessIconPanel"
|
||
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
From="0" To="1.2"
|
||
Duration="0:0:0.400">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<!-- 弹出后回弹到 1.0 -->
|
||
<DoubleAnimation Storyboard.TargetName="SuccessIconPanel"
|
||
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
From="1.2" To="1.0"
|
||
Duration="0:0:0.200"
|
||
BeginTime="0:0:0.400">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseInOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetName="SuccessIconPanel"
|
||
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
From="1.2" To="1.0"
|
||
Duration="0:0:0.200"
|
||
BeginTime="0:0:0.400">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseInOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 标题文字:淡入(延迟 300ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="TitlePanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.300">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 安装摘要:淡入(延迟 450ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="SummaryPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.450">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
|
||
<!-- 按钮区域:淡入(延迟 600ms) -->
|
||
<DoubleAnimation Storyboard.TargetName="ButtonsPanel"
|
||
Storyboard.TargetProperty="Opacity"
|
||
From="0" To="1"
|
||
Duration="0:0:0.400"
|
||
BeginTime="0:0:0.600">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Page.Triggers>
|
||
|
||
<!-- ===== 页面内容 ===== -->
|
||
<Grid Margin="40,24,40,16">
|
||
<StackPanel HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
MaxWidth="420">
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 成功图标 ===== -->
|
||
<!-- ============================== -->
|
||
<Grid x:Name="SuccessIconPanel"
|
||
Width="72" Height="72"
|
||
HorizontalAlignment="Center"
|
||
Margin="0,0,0,20">
|
||
<Grid.RenderTransform>
|
||
<ScaleTransform ScaleX="0" ScaleY="0" />
|
||
</Grid.RenderTransform>
|
||
|
||
<!-- 外层发光效果 -->
|
||
<Ellipse Fill="{DynamicResource SuccessBrush}"
|
||
Opacity="0.12"
|
||
Width="80" Height="80" />
|
||
|
||
<!-- 绿色圆形背景 -->
|
||
<Ellipse Fill="{DynamicResource SuccessBrush}"
|
||
Opacity="0.2"
|
||
Width="72" Height="72" />
|
||
|
||
<!-- 绿色圆圈 -->
|
||
<Path Data="M36,4C17.9,4 4,17.9 4,36C4,54.1 17.9,68 36,68C54.1,68 68,54.1 68,36C68,17.9 54.1,4 36,4Z"
|
||
Fill="None"
|
||
Stroke="{DynamicResource SuccessBrush}"
|
||
StrokeThickness="2.5"
|
||
Stretch="Uniform"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center" />
|
||
|
||
<!-- 勾号 -->
|
||
<Path Data="M22,36L32,46L50,26"
|
||
Fill="None"
|
||
Stroke="{DynamicResource SuccessBrush}"
|
||
StrokeThickness="3"
|
||
StrokeLineCap="Round"
|
||
StrokeLineJoin="Round"
|
||
Stretch="Uniform"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Margin="2,2,2,-2" />
|
||
</Grid>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 标题和描述 ===== -->
|
||
<!-- ============================== -->
|
||
<StackPanel x:Name="TitlePanel"
|
||
HorizontalAlignment="Center"
|
||
Opacity="0"
|
||
Margin="0,0,0,20">
|
||
|
||
<!-- 标题 -->
|
||
<TextBlock Text="安装完成!"
|
||
FontSize="24"
|
||
FontWeight="Bold"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
HorizontalAlignment="Center"
|
||
Margin="0,0,0,4" />
|
||
|
||
<!-- 描述 -->
|
||
<TextBlock Text="Better-Seewo 已成功安装到您的计算机"
|
||
FontSize="13"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
HorizontalAlignment="Center" />
|
||
</StackPanel>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 安装摘要 ===== -->
|
||
<!-- ============================== -->
|
||
<Border x:Name="SummaryPanel"
|
||
Background="{DynamicResource CardBackgroundBrush}"
|
||
BorderBrush="{DynamicResource BorderBrush}"
|
||
BorderThickness="1"
|
||
CornerRadius="8"
|
||
Padding="16"
|
||
Opacity="0"
|
||
Margin="0,0,0,24">
|
||
|
||
<StackPanel>
|
||
<!-- 摘要标题 -->
|
||
<TextBlock Text="安装摘要"
|
||
FontSize="13"
|
||
FontWeight="SemiBold"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
Margin="0,0,0,12" />
|
||
|
||
<!-- 版本号 -->
|
||
<Grid Margin="0,0,0,8">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.Column="0"
|
||
Text="版本号"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,16,0" />
|
||
<TextBlock x:Name="TxtVersion"
|
||
Grid.Column="1"
|
||
Text="v2.0.0"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextPrimaryBrush}" />
|
||
</Grid>
|
||
|
||
<!-- 安装路径 -->
|
||
<Grid Margin="0,0,0,8">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.Column="0"
|
||
Text="安装路径"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,16,0" />
|
||
<TextBlock x:Name="TxtInstallPath"
|
||
Grid.Column="1"
|
||
Text="C:\Program Files (x86)\Seewo\EasiNote5\Plugins\Better-EN5"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||
TextTrimming="CharacterEllipsis" />
|
||
</Grid>
|
||
|
||
<!-- 安装时间 -->
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBlock Grid.Column="0"
|
||
Text="安装时间"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
Margin="0,0,16,0" />
|
||
<TextBlock x:Name="TxtInstallTime"
|
||
Grid.Column="1"
|
||
Text="--"
|
||
FontSize="12"
|
||
Foreground="{DynamicResource TextPrimaryBrush}" />
|
||
</Grid>
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- ============================== -->
|
||
<!-- ===== 操作按钮 ===== -->
|
||
<!-- ============================== -->
|
||
<StackPanel x:Name="ButtonsPanel"
|
||
Opacity="0"
|
||
HorizontalAlignment="Center">
|
||
|
||
<Grid HorizontalAlignment="Center">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 启动管理器按钮 -->
|
||
<Button Grid.Column="0"
|
||
Content="启动管理器"
|
||
FontSize="13"
|
||
FontWeight="SemiBold"
|
||
Height="36"
|
||
Padding="24,0"
|
||
Margin="0,0,12,0"
|
||
Background="{DynamicResource AccentBrush}"
|
||
Foreground="White"
|
||
BorderThickness="0"
|
||
Cursor="Hand"
|
||
Click="BtnLaunchManager_Click"
|
||
Style="{DynamicResource PrimaryButtonStyle}" />
|
||
|
||
<!-- 关闭安装程序按钮 -->
|
||
<Button Grid.Column="1"
|
||
Content="关闭"
|
||
FontSize="13"
|
||
Height="36"
|
||
Padding="24,0"
|
||
Background="Transparent"
|
||
Foreground="{DynamicResource TextSecondaryBrush}"
|
||
BorderThickness="1"
|
||
BorderBrush="{DynamicResource BorderBrush}"
|
||
Cursor="Hand"
|
||
Click="BtnClose_Click"
|
||
Style="{DynamicResource ActionButtonStyle}" />
|
||
</Grid>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Grid>
|
||
|
||
<!-- ===== 页面级样式资源(按钮样式引用主窗口的样式) ===== -->
|
||
<Page.Resources>
|
||
|
||
<!-- 主要按钮样式(复制主窗口的样式,用于独立展示) -->
|
||
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="BtnBg"
|
||
Background="{TemplateBinding Background}"
|
||
CornerRadius="6"
|
||
Padding="{TemplateBinding Padding}">
|
||
<ContentPresenter HorizontalAlignment="Center"
|
||
VerticalAlignment="Center" />
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="BtnBg" Property="Background" Value="{DynamicResource AccentHoverBrush}" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="BtnBg" Property="Background" Value="{DynamicResource AccentPressedBrush}" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
<Style.Triggers>
|
||
<EventTrigger RoutedEvent="MouseEnter">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
To="1.05" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
To="1.05" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
<EventTrigger RoutedEvent="MouseLeave">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
To="1.0" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
To="1.0" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
|
||
<!-- 次要按钮样式 -->
|
||
<Style x:Key="ActionButtonStyle" TargetType="Button">
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="BtnBg"
|
||
Background="Transparent"
|
||
BorderBrush="{TemplateBinding BorderBrush}"
|
||
BorderThickness="{TemplateBinding BorderThickness}"
|
||
CornerRadius="6"
|
||
Padding="{TemplateBinding Padding}">
|
||
<ContentPresenter HorizontalAlignment="Center"
|
||
VerticalAlignment="Center" />
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="BtnBg" Property="Background" Value="{DynamicResource WindowButtonHoverBrush}" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="BtnBg" Property="Background" Value="{DynamicResource WindowButtonPressedBrush}" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
<Style.Triggers>
|
||
<EventTrigger RoutedEvent="MouseEnter">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
To="1.05" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
To="1.05" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
<EventTrigger RoutedEvent="MouseLeave">
|
||
<BeginStoryboard>
|
||
<Storyboard>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||
To="1.0" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
<DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||
To="1.0" Duration="0:0:0.200">
|
||
<DoubleAnimation.EasingFunction>
|
||
<CubicEase EasingMode="EaseOut" />
|
||
</DoubleAnimation.EasingFunction>
|
||
</DoubleAnimation>
|
||
</Storyboard>
|
||
</BeginStoryboard>
|
||
</EventTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Page.Resources>
|
||
|
||
</Page>
|