Image loading with cancellation

This commit is contained in:
ClemensFischer 2025-08-20 19:50:22 +02:00
parent 545e49b306
commit 220597ab31
5 changed files with 14 additions and 8 deletions

View file

@ -171,8 +171,11 @@ namespace MapControl
protected async Task UpdateImageAsync()
{
updateTimer.Stop();
cancellationTokenSource?.Cancel();
ClearValue(LoadingProgressProperty);
if (ParentMap != null && ParentMap.ActualWidth > 0d && ParentMap.ActualHeight > 0d)
{
var width = ParentMap.ActualWidth * RelativeImageSize;