mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Fade animations
This commit is contained in:
parent
b9a34fd5e4
commit
4c669f4df0
7 changed files with 45 additions and 39 deletions
|
|
@ -12,18 +12,22 @@ namespace MapControl
|
|||
{
|
||||
public static void FadeOver(Image topImage, Image bottomImage)
|
||||
{
|
||||
topImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
||||
var fadeInAnimation = new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = MapBase.ImageFadeDuration
|
||||
});
|
||||
};
|
||||
|
||||
bottomImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
||||
var fadeOutAnimation = new DoubleAnimation
|
||||
{
|
||||
To = 0d,
|
||||
BeginTime = MapBase.ImageFadeDuration,
|
||||
Duration = TimeSpan.Zero
|
||||
});
|
||||
Duration = TimeSpan.Zero,
|
||||
FillBehavior = FillBehavior.Stop
|
||||
};
|
||||
|
||||
topImage.BeginAnimation(OpacityProperty, fadeInAnimation);
|
||||
bottomImage.BeginAnimation(OpacityProperty, fadeOutAnimation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue