From 690c2071b13dceddd11e816e156f0174287a68ba Mon Sep 17 00:00:00 2001 From: ClemensF Date: Wed, 30 Oct 2013 18:23:13 +0100 Subject: [PATCH] Version 1.6.1: Fixed internal ZoomLevel, Center and Heading animation in MapBase. --- Caching/FileDbCache/Properties/AssemblyInfo.cs | 4 ++-- Caching/ImageFileCache/Properties/AssemblyInfo.cs | 4 ++-- MapControl/MapBase.Silverlight.WinRT.cs | 6 ------ MapControl/MapBase.WPF.cs | 9 +++++---- MapControl/MapBase.cs | 13 ++++++++++--- MapControl/Properties/AssemblyInfo.cs | 4 ++-- MapControl/WinRT/Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../StoreApplication/Properties/AssemblyInfo.cs | 4 ++-- .../SurfaceApplication/Properties/AssemblyInfo.cs | 4 ++-- .../WpfApplication/Properties/AssemblyInfo.cs | 4 ++-- 12 files changed, 33 insertions(+), 31 deletions(-) diff --git a/Caching/FileDbCache/Properties/AssemblyInfo.cs b/Caching/FileDbCache/Properties/AssemblyInfo.cs index f4c4a526..53145655 100644 --- a/Caching/FileDbCache/Properties/AssemblyInfo.cs +++ b/Caching/FileDbCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Caching/ImageFileCache/Properties/AssemblyInfo.cs b/Caching/ImageFileCache/Properties/AssemblyInfo.cs index 5d729f6b..8b705751 100644 --- a/Caching/ImageFileCache/Properties/AssemblyInfo.cs +++ b/Caching/ImageFileCache/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/MapBase.Silverlight.WinRT.cs b/MapControl/MapBase.Silverlight.WinRT.cs index 28367ef7..c772af1a 100644 --- a/MapControl/MapBase.Silverlight.WinRT.cs +++ b/MapControl/MapBase.Silverlight.WinRT.cs @@ -7,21 +7,15 @@ using Windows.Foundation; using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Media.Animation; #else using System.Windows; using System.Windows.Media; -using System.Windows.Media.Animation; #endif namespace MapControl { public partial class MapBase { - // Set FillBehavior.HoldEnd to prevent animation from returning - // to local value before invoking the Completed handler - private const FillBehavior AnimationFillBehavior = FillBehavior.HoldEnd; - public static readonly DependencyProperty ForegroundProperty = DependencyProperty.Register( "Foreground", typeof(Brush), typeof(MapBase), new PropertyMetadata(new SolidColorBrush(Colors.Black))); diff --git a/MapControl/MapBase.WPF.cs b/MapControl/MapBase.WPF.cs index d39b4765..40cc9b42 100644 --- a/MapControl/MapBase.WPF.cs +++ b/MapControl/MapBase.WPF.cs @@ -5,15 +5,11 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media; -using System.Windows.Media.Animation; namespace MapControl { public partial class MapBase { - // FillBehavior must be set to Stop to re-enable local property values - private const FillBehavior AnimationFillBehavior = FillBehavior.Stop; - public static readonly DependencyProperty ForegroundProperty = System.Windows.Controls.Control.ForegroundProperty.AddOwner(typeof(MapBase)); @@ -31,6 +27,11 @@ namespace MapControl AddVisualChild(tileContainer); } + partial void RemoveAnimation(DependencyProperty property) + { + BeginAnimation(property, null); + } + protected override int VisualChildrenCount { get { return base.VisualChildrenCount + 1; } diff --git a/MapControl/MapBase.cs b/MapControl/MapBase.cs index 0eaf1db2..391e3f9a 100644 --- a/MapControl/MapBase.cs +++ b/MapControl/MapBase.cs @@ -105,6 +105,7 @@ namespace MapControl } partial void Initialize(); + partial void RemoveAnimation(DependencyProperty property); /// /// Raised when the current viewport has changed. @@ -610,7 +611,7 @@ namespace MapControl To = new Point(targetCenter.Longitude, targetCenter.Latitude), Duration = AnimationDuration, EasingFunction = AnimationEasingFunction, - FillBehavior = AnimationFillBehavior + FillBehavior = FillBehavior.HoldEnd }; centerAnimation.Completed += CenterAnimationCompleted; @@ -628,6 +629,8 @@ namespace MapControl InternalSetValue(CenterProperty, TargetCenter); InternalSetValue(CenterPointProperty, new Point(TargetCenter.Longitude, TargetCenter.Latitude)); + RemoveAnimation(CenterPointProperty); // remove holding animation in WPF + ResetTransformOrigin(); UpdateTransform(); } @@ -714,7 +717,7 @@ namespace MapControl To = targetZoomLevel, Duration = AnimationDuration, EasingFunction = AnimationEasingFunction, - FillBehavior = AnimationFillBehavior + FillBehavior = FillBehavior.HoldEnd }; zoomLevelAnimation.Completed += ZoomLevelAnimationCompleted; @@ -730,6 +733,8 @@ namespace MapControl zoomLevelAnimation = null; InternalSetValue(ZoomLevelProperty, TargetZoomLevel); + RemoveAnimation(ZoomLevelProperty); // remove holding animation in WPF + UpdateTransform(); ResetTransformOrigin(); } @@ -789,7 +794,7 @@ namespace MapControl By = delta, Duration = AnimationDuration, EasingFunction = AnimationEasingFunction, - FillBehavior = AnimationFillBehavior + FillBehavior = FillBehavior.HoldEnd }; headingAnimation.Completed += HeadingAnimationCompleted; @@ -806,6 +811,8 @@ namespace MapControl headingAnimation = null; InternalSetValue(HeadingProperty, TargetHeading); + RemoveAnimation(HeadingProperty); // remove holding animation in WPF + UpdateTransform(); } } diff --git a/MapControl/Properties/AssemblyInfo.cs b/MapControl/Properties/AssemblyInfo.cs index 1e03e1b9..97e075f4 100644 --- a/MapControl/Properties/AssemblyInfo.cs +++ b/MapControl/Properties/AssemblyInfo.cs @@ -15,8 +15,8 @@ using System.Windows; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/MapControl/WinRT/Properties/AssemblyInfo.cs b/MapControl/WinRT/Properties/AssemblyInfo.cs index 681c4d66..3719eafa 100644 --- a/MapControl/WinRT/Properties/AssemblyInfo.cs +++ b/MapControl/WinRT/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs index a916c97e..884aca6e 100644 --- a/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication.Web/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs index 25421661..71944080 100644 --- a/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SilverlightApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs index e7546f68..487625fe 100644 --- a/SampleApps/StoreApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/StoreApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs index b7e186d4..cf888779 100644 --- a/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/SurfaceApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs index 88c53a36..b5b521a4 100644 --- a/SampleApps/WpfApplication/Properties/AssemblyInfo.cs +++ b/SampleApps/WpfApplication/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Clemens Fischer")] [assembly: AssemblyCopyright("Copyright © Clemens Fischer 2012-2013")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("1.6.0")] -[assembly: AssemblyFileVersion("1.6.0")] +[assembly: AssemblyVersion("1.6.1")] +[assembly: AssemblyFileVersion("1.6.1")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)]