mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
33 lines
929 B
C#
33 lines
929 B
C#
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
// Copyright © Clemens Fischer
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
using System;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media.Animation;
|
|
|
|
namespace MapControl
|
|
{
|
|
public partial class MapImageLayer
|
|
{
|
|
public static void FadeOver(Image topImage, Image bottomImage)
|
|
{
|
|
var fadeInAnimation = new DoubleAnimation
|
|
{
|
|
To = 1d,
|
|
Duration = MapBase.ImageFadeDuration
|
|
};
|
|
|
|
var fadeOutAnimation = new DoubleAnimation
|
|
{
|
|
To = 0d,
|
|
BeginTime = MapBase.ImageFadeDuration,
|
|
Duration = TimeSpan.Zero
|
|
};
|
|
|
|
topImage.BeginAnimation(OpacityProperty, fadeInAnimation);
|
|
bottomImage.BeginAnimation(OpacityProperty, fadeOutAnimation);
|
|
}
|
|
}
|
|
}
|