MapImageLayer animation

This commit is contained in:
ClemensFischer 2025-01-25 16:47:42 +01:00
parent 2d6b2eb2aa
commit e0e2061014
5 changed files with 22 additions and 24 deletions

View file

@ -8,7 +8,7 @@ namespace MapControl
{
public partial class MapImageLayer
{
public static void FadeOver(Image topImage, Image bottomImage)
private void FadeOver()
{
var fadeInAnimation = new Animation
{
@ -24,8 +24,8 @@ namespace MapControl
}
};
_ = fadeInAnimation.RunAsync(topImage).ContinueWith(
_ => bottomImage.Opacity = 0d,
_ = fadeInAnimation.RunAsync(Children[1]).ContinueWith(
_ => Children[0].Opacity = 0d,
TaskScheduler.FromCurrentSynchronizationContext());
}
}