2024-05-21 22:05:01 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
2025-01-01 18:57:55 +01:00
|
|
|
|
// Copyright © Clemens Fischer
|
2024-05-21 22:05:01 +02:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
2025-01-05 09:22:50 +01:00
|
|
|
|
using System.Windows.Controls;
|
2024-05-21 22:05:01 +02:00
|
|
|
|
using System.Windows.Media.Animation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2025-01-05 09:22:50 +01:00
|
|
|
|
public partial class MapImageLayer
|
2024-05-21 22:05:01 +02:00
|
|
|
|
{
|
2025-01-05 09:22:50 +01:00
|
|
|
|
public static void FadeOver(Image topImage, Image bottomImage)
|
2024-05-21 22:05:01 +02:00
|
|
|
|
{
|
2025-01-05 09:22:50 +01:00
|
|
|
|
topImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
2024-05-21 22:05:01 +02:00
|
|
|
|
{
|
|
|
|
|
|
To = 1d,
|
|
|
|
|
|
Duration = MapBase.ImageFadeDuration
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2025-01-05 09:22:50 +01:00
|
|
|
|
bottomImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
2024-05-21 22:05:01 +02:00
|
|
|
|
{
|
|
|
|
|
|
To = 0d,
|
|
|
|
|
|
BeginTime = MapBase.ImageFadeDuration,
|
|
|
|
|
|
Duration = TimeSpan.Zero
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|