XAML-Map-Control/MapControl/Avalonia/Tile.Avalonia.cs

35 lines
960 B
C#
Raw Normal View History

2024-05-19 23:23:27 +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-19 23:23:27 +02:00
// Licensed under the Microsoft Public License (Ms-PL)
2025-01-05 09:22:50 +01:00
using System;
2024-05-19 23:23:27 +02:00
namespace MapControl
{
public partial class Tile
{
private void AnimateImageOpacity()
{
2025-01-05 09:22:50 +01:00
var animation = new Animation
{
Duration = MapBase.ImageFadeDuration,
Children =
{
new KeyFrame
{
KeyTime = TimeSpan.Zero,
Setters = { new Setter(Visual.OpacityProperty, 0d) }
},
new KeyFrame
{
KeyTime = MapBase.ImageFadeDuration,
Setters = { new Setter(Visual.OpacityProperty, 1d) }
}
}
};
_ = animation.RunAsync(Image);
2024-05-19 23:23:27 +02:00
}
}
}