// -----------------------------------------------------------------------
//
// Copyright 2014 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Animation
{
using System;
///
/// Defines animation extension methods.
///
public static class AnimationExtensions
{
///
/// Returns a new for the specified
/// using linear easing.
///
/// The type of the .
/// The property to animate.
/// The animation duration in milliseconds.
///
/// A that can be added to the
/// collection.
///
public static PropertyTransition Transition(this PerspexProperty property, int milliseconds)
{
return Transition(property, TimeSpan.FromMilliseconds(milliseconds));
}
///
/// Returns a new for the specified
/// using linear easing.
///
/// The type of the .
/// The property to animate.
/// The animation duration.
///
/// A that can be added to the
/// collection.
///
public static PropertyTransition Transition(this PerspexProperty property, TimeSpan duration)
{
return new PropertyTransition(property, duration, LinearEasing.For());
}
}
}