mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 16:05:50 +00:00
Moved asynchronous image loading to Tile class
This commit is contained in:
parent
2f9c50fb47
commit
f4d43eeb44
10 changed files with 114 additions and 184 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue