Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
niels9001 committed Jan 30, 2025
1 parent 8b44222 commit 231d52b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions AIDevGallery/Controls/HomePage/Header/AnimatedImage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
mc:Ignorable="d">

<Grid>
<Image x:Name="BottomImage" Stretch="UniformToFill" />
<Image x:Name="TopImage" Stretch="UniformToFill" />
<Image
x:Name="BottomImage"
Opacity="1"
Stretch="UniformToFill" />
<Image
x:Name="TopImage"
Opacity="0"
Stretch="UniformToFill" />
</Grid>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected virtual void IsImageChanged(Uri oldValue, Uri newValue)
private void OnIsImageChanged()
{
BottomImage.Source = new BitmapImage(this.ImageUrl);
AnimationSet selectAnimation = [new OpacityAnimation() { From = 1, To = 0, Duration = TimeSpan.FromMilliseconds(1000) }];
AnimationSet selectAnimation = [new OpacityAnimation() { From = 1, To = 0, Duration = TimeSpan.FromMilliseconds(800) }];
selectAnimation.Completed += (s, e) =>
{
TopImage.Source = new BitmapImage(this.ImageUrl);
Expand Down

0 comments on commit 231d52b

Please sign in to comment.