Added Tile.SetImageAsync

This commit is contained in:
Clemens 2021-06-27 21:50:13 +02:00
parent 772549c109
commit 9ebc88204b
4 changed files with 42 additions and 40 deletions

View file

@ -6,11 +6,17 @@ using System;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
namespace MapControl
{
public partial class Tile
{
public DispatcherOperation SetImageAsync(ImageSource image)
{
return Image.Dispatcher.InvokeAsync(() => SetImage(image));
}
public void SetImage(ImageSource image, bool fadeIn = true)
{
Pending = false;