mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
34 lines
864 B
C#
34 lines
864 B
C#
using Avalonia;
|
|
using Avalonia.Animation;
|
|
using Avalonia.Styling;
|
|
using System;
|
|
|
|
namespace MapControl
|
|
{
|
|
public partial class Tile
|
|
{
|
|
private void FadeIn()
|
|
{
|
|
var fadeInAnimation = 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) }
|
|
}
|
|
}
|
|
};
|
|
|
|
_ = fadeInAnimation.RunAsync(Image);
|
|
}
|
|
}
|
|
}
|