// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
namespace Perspex.Animation
{
///
/// 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());
}
}
}