add:软件启动动画
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<StackPanel>
|
||||
<!-- 启动图片 -->
|
||||
<Image x:Name="StartupImage"
|
||||
Source="pack://application:,,,/Resources/Startup-animation/ICC Autumn.png"
|
||||
Width="600"
|
||||
Height="450"
|
||||
Stretch="Uniform" />
|
||||
@@ -41,23 +40,27 @@
|
||||
FontWeight="SemiBold"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,-150,0,0" />
|
||||
Margin="0,-150,0,140" />
|
||||
|
||||
<!-- 进度条 -->
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Margin="1,-175,0,0"
|
||||
Width="530"
|
||||
Margin="1,-200,0,0"
|
||||
Width="532"
|
||||
Height="10">
|
||||
<!-- 进度条填充 -->
|
||||
<Border x:Name="ProgressBarFill"
|
||||
Background="#0198D4"
|
||||
CornerRadius="2.5"
|
||||
HorizontalAlignment="Left"
|
||||
Width="0">
|
||||
</Border>
|
||||
<!-- 进度条填充 -->
|
||||
<Border x:Name="ProgressBarFill"
|
||||
Background="#41A5EE"
|
||||
HorizontalAlignment="Left"
|
||||
Width="0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="0,0,7,7"/>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
</Border>
|
||||
<!-- 进度条背景 -->
|
||||
<Border x:Name="ProgressBarBackground"
|
||||
CornerRadius="2.5"
|
||||
CornerRadius="7"
|
||||
BorderThickness="1"
|
||||
ClipToBounds="True"/>
|
||||
</Grid>
|
||||
|
||||
@@ -130,6 +130,18 @@ namespace Ink_Canvas.Windows
|
||||
{
|
||||
// 确保最终值正确设置
|
||||
ProgressBarFill.Width = targetWidth;
|
||||
|
||||
// 根据进度调整圆角
|
||||
if (progress >= 100)
|
||||
{
|
||||
// 进度100%时,底部角都是圆角
|
||||
ProgressBarFill.CornerRadius = new CornerRadius(0, 0, 7, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 进度未满时,只有左侧是圆角
|
||||
ProgressBarFill.CornerRadius = new CornerRadius(0, 0, 0, 7);
|
||||
}
|
||||
};
|
||||
|
||||
// 开始动画
|
||||
|
||||
Reference in New Issue
Block a user