Fade animations

This commit is contained in:
ClemensFischer 2025-01-05 10:31:15 +01:00
parent b9a34fd5e4
commit 4c669f4df0
7 changed files with 45 additions and 39 deletions

View file

@ -10,7 +10,7 @@ namespace MapControl
{
public static void FadeOver(Image topImage, Image bottomImage)
{
var animation = new Animation
var fadeInAnimation = new Animation
{
FillMode = FillMode.Forward,
Duration = MapBase.ImageFadeDuration,
@ -24,7 +24,7 @@ namespace MapControl
}
};
_ = animation.RunAsync(topImage).ContinueWith(
_ = fadeInAnimation.RunAsync(topImage).ContinueWith(
_ => bottomImage.Opacity = 0d,
TaskScheduler.FromCurrentSynchronizationContext());
}