From 2a4de62c454ea08799b8eba01647936ccf4a076d Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Sun, 26 Jan 2025 15:17:08 +0100 Subject: [PATCH] Update MapImageLayer.cs --- MapControl/Shared/MapImageLayer.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/MapControl/Shared/MapImageLayer.cs b/MapControl/Shared/MapImageLayer.cs index de131363..f2bc1342 100644 --- a/MapControl/Shared/MapImageLayer.cs +++ b/MapControl/Shared/MapImageLayer.cs @@ -133,7 +133,11 @@ namespace MapControl { while (Children.Count < 2) { - Children.Add(new Image { Stretch = Stretch.Fill }); + Children.Add(new Image + { + Opacity = 0d, + Stretch = Stretch.Fill + }); } } else @@ -236,7 +240,15 @@ namespace MapControl topImage.Source = image; SetBoundingBox(topImage, boundingBox); - FadeOver(); + if (MapBase.ImageFadeDuration > TimeSpan.Zero) + { + FadeOver(); + } + else + { + topImage.Opacity = 1d; + Children[0].Opacity = 0d; + } } } }