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

35 lines
959 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
{
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
}
}
}