diff --git a/MapControl/Avalonia/MapImageLayer.Avalonia.cs b/MapControl/Avalonia/MapImageLayer.Avalonia.cs index 22feaa67..28d54690 100644 --- a/MapControl/Avalonia/MapImageLayer.Avalonia.cs +++ b/MapControl/Avalonia/MapImageLayer.Avalonia.cs @@ -19,7 +19,7 @@ namespace MapControl new KeyFrame { KeyTime = MapBase.ImageFadeDuration, - Setters = { new Setter(Visual.OpacityProperty, 1d) } + Setters = { new Setter(OpacityProperty, 1d) } } } }; diff --git a/MapControl/WPF/MapBase.WPF.cs b/MapControl/WPF/MapBase.WPF.cs index 16c8ce81..582709c5 100644 --- a/MapControl/WPF/MapBase.WPF.cs +++ b/MapControl/WPF/MapBase.WPF.cs @@ -137,8 +137,7 @@ namespace MapControl { To = new Location(targetCenter.Latitude, CoerceLongitude(targetCenter.Longitude)), Duration = AnimationDuration, - EasingFunction = AnimationEasingFunction, - FillBehavior = FillBehavior.Stop + EasingFunction = AnimationEasingFunction }; centerAnimation.Completed += CenterAnimationCompleted; @@ -154,9 +153,9 @@ namespace MapControl centerAnimation.Completed -= CenterAnimationCompleted; centerAnimation = null; - BeginAnimation(CenterProperty, null); SetValueInternal(CenterProperty, TargetCenter); UpdateTransform(); + BeginAnimation(CenterProperty, null); } } @@ -202,8 +201,7 @@ namespace MapControl { To = targetZoomLevel, Duration = AnimationDuration, - EasingFunction = AnimationEasingFunction, - FillBehavior = FillBehavior.Stop + EasingFunction = AnimationEasingFunction }; zoomLevelAnimation.Completed += ZoomLevelAnimationCompleted; @@ -219,9 +217,9 @@ namespace MapControl zoomLevelAnimation.Completed -= ZoomLevelAnimationCompleted; zoomLevelAnimation = null; - BeginAnimation(ZoomLevelProperty, null); SetValueInternal(ZoomLevelProperty, TargetZoomLevel); UpdateTransform(true); + BeginAnimation(ZoomLevelProperty, null); } } @@ -262,8 +260,7 @@ namespace MapControl { By = delta, Duration = AnimationDuration, - EasingFunction = AnimationEasingFunction, - FillBehavior = FillBehavior.Stop + EasingFunction = AnimationEasingFunction }; headingAnimation.Completed += HeadingAnimationCompleted; @@ -279,9 +276,9 @@ namespace MapControl headingAnimation.Completed -= HeadingAnimationCompleted; headingAnimation = null; - BeginAnimation(HeadingProperty, null); SetValueInternal(HeadingProperty, TargetHeading); UpdateTransform(); + BeginAnimation(HeadingProperty, null); } } } diff --git a/MapControl/WPF/MapImageLayer.WPF.cs b/MapControl/WPF/MapImageLayer.WPF.cs index a64ae88b..ad8f1aba 100644 --- a/MapControl/WPF/MapImageLayer.WPF.cs +++ b/MapControl/WPF/MapImageLayer.WPF.cs @@ -22,8 +22,7 @@ namespace MapControl { To = 0d, BeginTime = MapBase.ImageFadeDuration, - Duration = TimeSpan.Zero, - FillBehavior = FillBehavior.Stop + Duration = TimeSpan.Zero }; topImage.BeginAnimation(OpacityProperty, fadeInAnimation); diff --git a/MapControl/WinUI/MapImageLayer.WinUI.cs b/MapControl/WinUI/MapImageLayer.WinUI.cs index d1d33299..12be719d 100644 --- a/MapControl/WinUI/MapImageLayer.WinUI.cs +++ b/MapControl/WinUI/MapImageLayer.WinUI.cs @@ -27,8 +27,7 @@ namespace MapControl { To = 0d, BeginTime = MapBase.ImageFadeDuration, - Duration = TimeSpan.Zero, - FillBehavior = FillBehavior.Stop + Duration = TimeSpan.Zero }; Storyboard.SetTargetProperty(fadeInAnimation, nameof(Opacity));