mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Removed OpacityHelper
This commit is contained in:
parent
3afbdadf0c
commit
b9a34fd5e4
10 changed files with 144 additions and 171 deletions
|
|
@ -3,30 +3,27 @@
|
|||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Animation;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
public static class OpacityHelper
|
||||
public partial class MapImageLayer
|
||||
{
|
||||
public static Task SwapOpacitiesAsync(UIElement topElement, UIElement bottomElement)
|
||||
public static void FadeOver(Image topImage, Image bottomImage)
|
||||
{
|
||||
topElement.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation
|
||||
topImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
||||
{
|
||||
To = 1d,
|
||||
Duration = MapBase.ImageFadeDuration
|
||||
});
|
||||
|
||||
bottomElement.BeginAnimation(UIElement.OpacityProperty, new DoubleAnimation
|
||||
bottomImage.BeginAnimation(OpacityProperty, new DoubleAnimation
|
||||
{
|
||||
To = 0d,
|
||||
BeginTime = MapBase.ImageFadeDuration,
|
||||
Duration = TimeSpan.Zero
|
||||
});
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue