动画
This commit is contained in:
parent
27c70b9a36
commit
c844b1b1c8
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/1.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/1.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 MiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/2.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/3.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/gif/3.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
@ -4,19 +4,21 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.Views"
|
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.Views"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d" Height="500" Width="800">
|
||||||
<Grid VerticalAlignment="Center">
|
<Grid VerticalAlignment="Center">
|
||||||
<Grid.Background>
|
<Grid.Background>
|
||||||
<ImageBrush ImageSource="/Resources/Img/Album/home_bg.png" Stretch="UniformToFill"/>
|
<ImageBrush ImageSource="/Resources/Img/Album/home_bg.png" Stretch="UniformToFill"/>
|
||||||
</Grid.Background>
|
</Grid.Background>
|
||||||
|
|
||||||
|
<Image x:Name="GifImage" Stretch="Uniform" Width="300" Height="300"/>
|
||||||
|
|
||||||
<!-- 顶部图片 -->
|
<!-- 顶部图片 -->
|
||||||
<Image
|
<!--<Image
|
||||||
Source="/Resources/Img/Album/title.png"
|
Source="/Resources/Img/Album/title.png"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Width="615"
|
Width="615"
|
||||||
Margin="0,100,0,0"
|
Margin="0,100,0,0"
|
||||||
/>
|
/>-->
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -10,8 +11,8 @@ using System.Windows.Documents;
|
|||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
|
||||||
using Wpf_AiSportsMicrospace.Common;
|
using Wpf_AiSportsMicrospace.Common;
|
||||||
|
using WpfAnimatedGif;
|
||||||
|
|
||||||
namespace Wpf_AiSportsMicrospace.Views
|
namespace Wpf_AiSportsMicrospace.Views
|
||||||
{
|
{
|
||||||
@ -23,6 +24,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
public GroupJumpRope()
|
public GroupJumpRope()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
var image = new BitmapImage();
|
||||||
|
image.BeginInit();
|
||||||
|
image.UriSource = new Uri("../../Resources/Img/gif/1.gif", UriKind.Relative); // 替换成你的 GIF 路径
|
||||||
|
image.EndInit();
|
||||||
|
|
||||||
|
// 设置动画源
|
||||||
|
ImageBehavior.SetAnimatedSource(GifImage, image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
// 默认显示首页
|
// 默认显示首页
|
||||||
MainContent.Content = new Home();
|
MainContent.Content = new GroupJumpRope();
|
||||||
}
|
}
|
||||||
public void SwitchPage(UserControl newPage, bool fromRight)
|
public void SwitchPage(UserControl newPage, bool fromRight)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,6 +32,9 @@
|
|||||||
<None Remove="Resources\Img\Badge\4.png" />
|
<None Remove="Resources\Img\Badge\4.png" />
|
||||||
<None Remove="Resources\Img\Badge\5.jpg" />
|
<None Remove="Resources\Img\Badge\5.jpg" />
|
||||||
<None Remove="Resources\Img\Badge\logo.png" />
|
<None Remove="Resources\Img\Badge\logo.png" />
|
||||||
|
<None Remove="Resources\Img\gif\1.gif" />
|
||||||
|
<None Remove="Resources\Img\gif\2.gif" />
|
||||||
|
<None Remove="Resources\Img\gif\3.gif" />
|
||||||
<None Remove="Resources\Music\homeprojectselected.mp3" />
|
<None Remove="Resources\Music\homeprojectselected.mp3" />
|
||||||
<None Remove="Resources\Music\homeprojectselected1.mp3" />
|
<None Remove="Resources\Music\homeprojectselected1.mp3" />
|
||||||
<None Remove="Resources\Music\musicjumprope.mp3" />
|
<None Remove="Resources\Music\musicjumprope.mp3" />
|
||||||
@ -55,6 +58,7 @@
|
|||||||
<PackageReference Include="SkiaSharp" Version="3.119.0" />
|
<PackageReference Include="SkiaSharp" Version="3.119.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="9.0.9" />
|
<PackageReference Include="System.Drawing.Common" Version="9.0.9" />
|
||||||
<PackageReference Include="System.Speech" Version="9.0.9" />
|
<PackageReference Include="System.Speech" Version="9.0.9" />
|
||||||
|
<PackageReference Include="WpfAnimatedGif" Version="2.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -145,6 +149,15 @@
|
|||||||
<Resource Include="Resources\Img\Badge\5.jpg">
|
<Resource Include="Resources\Img\Badge\5.jpg">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<Resource Include="Resources\Img\gif\1.gif">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="Resources\Img\gif\2.gif">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
|
<Resource Include="Resources\Img\gif\3.gif">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Resource>
|
||||||
<Resource Include="Resources\Music\homeprojectselected.mp3">
|
<Resource Include="Resources\Music\homeprojectselected.mp3">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user