mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-01-24 09:30:53 +01:00
Animation FillBehavior
This commit is contained in:
parent
5856223e17
commit
2d6b2eb2aa
|
|
@ -19,7 +19,7 @@ namespace MapControl
|
|||
new KeyFrame
|
||||
{
|
||||
KeyTime = MapBase.ImageFadeDuration,
|
||||
Setters = { new Setter(Visual.OpacityProperty, 1d) }
|
||||
Setters = { new Setter(OpacityProperty, 1d) }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ namespace MapControl
|
|||
{
|
||||
To = 0d,
|
||||
BeginTime = MapBase.ImageFadeDuration,
|
||||
Duration = TimeSpan.Zero,
|
||||
FillBehavior = FillBehavior.Stop
|
||||
Duration = TimeSpan.Zero
|
||||
};
|
||||
|
||||
topImage.BeginAnimation(OpacityProperty, fadeInAnimation);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue