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

31 lines
798 B
C#
Raw Normal View History

2025-02-27 18:46:32 +01:00
using System;
2025-01-05 09:22:50 +01:00
2024-05-19 23:23:27 +02:00
namespace MapControl
{
public partial class Tile
{
2025-01-05 10:31:15 +01:00
private void FadeIn()
2024-05-19 23:23:27 +02:00
{
2025-01-05 10:31:15 +01:00
var fadeInAnimation = new Animation
2025-01-05 09:22:50 +01:00
{
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) }
}
}
};
2025-01-05 10:31:15 +01:00
_ = fadeInAnimation.RunAsync(Image);
2024-05-19 23:23:27 +02:00
}
}
}