2017-06-25 23:05:48 +02:00
|
|
|
|
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
|
|
|
|
|
// © 2017 Clemens Fischer
|
2012-11-22 21:42:29 +01:00
|
|
|
|
// Licensed under the Microsoft Public License (Ms-PL)
|
|
|
|
|
|
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Media.Animation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MapControl
|
|
|
|
|
|
{
|
2014-10-30 16:27:36 +01:00
|
|
|
|
internal static class Extensions
|
2012-11-22 21:42:29 +01:00
|
|
|
|
{
|
|
|
|
|
|
public static void BeginAnimation(this DependencyObject obj, DependencyProperty property, Timeline animation)
|
|
|
|
|
|
{
|
|
|
|
|
|
Storyboard.SetTargetProperty(animation, new PropertyPath(property));
|
|
|
|
|
|
Storyboard.SetTarget(animation, obj);
|
|
|
|
|
|
var storyboard = new Storyboard();
|
|
|
|
|
|
storyboard.Children.Add(animation);
|
|
|
|
|
|
storyboard.Begin();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|