Moved asynchronous image loading to Tile class

This commit is contained in:
ClemensFischer 2025-09-10 20:09:12 +02:00
parent 2f9c50fb47
commit f4d43eeb44
10 changed files with 114 additions and 184 deletions

View file

@ -1,5 +1,4 @@
using System;
#if WPF
#if WPF
using System.Windows.Controls;
using System.Windows.Media;
#elif UWP
@ -25,25 +24,12 @@ namespace MapControl
Column = ((x % columnCount) + columnCount) % columnCount;
}
public Image Image { get; } = new Image { Stretch = Stretch.Fill };
public int ZoomLevel { get; }
public int X { get; }
public int Y { get; }
public int Column { get; }
public int Row => Y;
public Image Image { get; } = new Image { Stretch = Stretch.Fill };
public bool IsPending { get; set; } = true;
public void SetImageSource(ImageSource image)
{
IsPending = false;
Image.Source = image;
if (image != null && MapBase.ImageFadeDuration > TimeSpan.Zero)
{
FadeIn();
}
}
}
}