兼容win7版应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
6.3 KiB

<Window x:Class="AIK.Views.UpdatePages.UpdateWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d"
ResizeMode="NoResize"
WindowStyle="SingleBorderWindow"
Title="{DynamicResource UpdateTips}" Height="450" Width="800">
<Window.Resources>
<!-- 圆角进度条 -->
<Style TargetType="ProgressBar">
<Setter Property="Height" Value="6"/>
<Setter Property="Foreground" Value="#409EFF"/>
<Setter Property="Background" Value="#E5E5E8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Border CornerRadius="3" Background="{TemplateBinding Background}">
<Grid>
<Rectangle x:Name="PART_Track" Fill="Transparent"/>
<Rectangle x:Name="PART_Indicator"
HorizontalAlignment="Left"
Fill="{TemplateBinding Foreground}">
<Rectangle.Clip>
<RectangleGeometry RadiusX="3" RadiusY="3"/>
</Rectangle.Clip>
</Rectangle>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- 主按钮 → 更大、更舒展、更美观 -->
<Style TargetType="Button" x:Key="Primary">
<Setter Property="Background" Value="#409EFF"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Padding" Value="32 14"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="10" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#59a1ff"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#338eef"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- 次按钮 → 更大、更舒展、更美观 -->
<Style TargetType="Button" x:Key="Default">
<Setter Property="Background" Value="#f5f7fa"/>
<Setter Property="Foreground" Value="#333"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Padding" Value="32 14"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border CornerRadius="10" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#e9edf2"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#dce3ec"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Card" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.2"/>
<DoubleAnimation Storyboard.TargetName="Card" Storyboard.TargetProperty="RenderTransform.Y" From="15" To="0" Duration="0:0:0.25"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Border x:Name="Card" Margin="20" Opacity="0" Background="White" CornerRadius="14">
<Border.RenderTransform>
<TranslateTransform Y="0"/>
</Border.RenderTransform>
<Grid Margin="30">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{DynamicResource NewVersionFound}" FontSize="26" FontWeight="Bold" Foreground="#1D2129"/>
<TextBlock x:Name="TbVersion" Grid.Row="1" Margin="0 10 0 0" FontSize="14" Foreground="#86909C"/>
<ScrollViewer Grid.Row="2" Margin="0 20" Background="#F7F8FA" >
<TextBlock x:Name="TbLog" Padding="16" FontSize="14" Foreground="#4E5969" TextWrapping="Wrap"/>
</ScrollViewer>
<ProgressBar x:Name="ProgressBar" Grid.Row="3" Visibility="Collapsed" Margin="0 0 0 16"/>
<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="BtnLater" Content="{DynamicResource UpdateLater}" Style="{StaticResource Default}" Click="BtnLater_Click" Margin="0 0 16 0"/>
<Button x:Name="BtnNow" Content="{DynamicResource UpdateNow}" Style="{StaticResource Primary}" Click="BtnNow_Click"/>
</StackPanel>
</Grid>
</Border>
</Window>