This commit is contained in:
NaBian committed 2019-11-29 22:41:18 +08:00
commit 9d13e9bea6
3 files changed
+14 -5

No files matched your search

@@ -4,8 +4,8 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;
using HandyControl.Tools;
// ReSharper disable PossibleInvalidOperationException
// ReSharper disable PossibleInvalidOperationException
namespace HandyControl.Media.Animation
{
public class GeometryAnimation : GeometryAnimationBase
@@ -20,7 +20,7 @@ namespace HandyControl.Media.Animation
public GeometryAnimation()
{
}
public GeometryAnimation(string fromValue, string toValue) : this()
@@ -1,4 +1,6 @@
using System;
using System.Globalization;
using System.Threading;
using System.Windows.Media;
using System.Windows.Media.Animation;
@@ -6,6 +8,11 @@ namespace HandyControl.Media.Animation
{
public abstract class GeometryAnimationBase : AnimationTimeline
{
protected GeometryAnimationBase()
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
}
public new GeometryAnimationBase Clone() => (GeometryAnimationBase)base.Clone();
public sealed override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
@@ -11,7 +11,6 @@ using System.Windows.Media.Animation;
using HandyControl.Tools;
// ReSharper disable PossibleInvalidOperationException
namespace HandyControl.Media.Animation
{
[ContentProperty("KeyFrames")]
@@ -38,7 +37,10 @@ namespace HandyControl.Media.Animation
private bool _areKeyTimesValid;
public GeometryAnimationUsingKeyFrames() => _areKeyTimesValid = true;
public GeometryAnimationUsingKeyFrames()
{
_areKeyTimesValid = true;
}
public new GeometryAnimationUsingKeyFrames Clone() => (GeometryAnimationUsingKeyFrames)base.Clone();
@@ -516,4 +518,4 @@ namespace HandyControl.Media.Animation
while (index < maxKeyFrameIndex);
}
}
}
}