mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Reset Tile.IsPending on request cancellation
This commit is contained in:
parent
c3386d1fbb
commit
545e49b306
5 changed files with 22 additions and 8 deletions
|
|
@ -11,7 +11,11 @@ namespace MapControl
|
|||
{
|
||||
var image = await loadImageFunc().ConfigureAwait(false);
|
||||
|
||||
if (!cancellationToken.IsCancellationRequested)
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
tile.IsPending = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = tile.Image.Dispatcher.InvokeAsync(() => tile.SetImageSource(image)); // no need to await InvokeAsync
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue