blob: fc6d75d6a23b21716145f8c2850ca3d855de6245 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Animation;
using Tango.Editors;
namespace Tango.Editors
{
/// <summary>
/// Represents an animation configuration which can be applied to an <see cref="IConfigurable"/> object when invoking the <see cref="IConfigurable.SetConfiguration"/> method.
/// </summary>
/// <seealso cref="IConfiguration" />
/// <seealso cref="IConfigurable" />
public class ConfigurationAnimation
{
/// <summary>
/// Occurs when the animation is completed.
/// </summary>
public event EventHandler<Object> AnimationCompleted;
/// <summary>
/// Gets or sets the animation duration.
/// </summary>
public TimeSpan Duration { get; set; }
/// <summary>
/// Gets or sets the acceleration ratio.
/// </summary>
public double AccelerationRatio { get; set; }
/// <summary>
/// Gets or sets the deceleration ratio.
/// </summary>
public double DecelerationRatio { get; set; }
/// <summary>
/// Gets or sets the easing function.
/// </summary>
public IEasingFunction EasingFunction { get; set; }
/// <summary>
/// Raises the animation completed event.
/// </summary>
/// <param name="obj">The object.</param>
public void RaiseAnimationCompleted(Object obj)
{
if (AnimationCompleted != null) AnimationCompleted(this, obj);
}
/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationAnimation"/> class.
/// </summary>
public ConfigurationAnimation()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationAnimation"/> class.
/// </summary>
/// <param name="duration">The animation duration.</param>
public ConfigurationAnimation(TimeSpan duration) : this()
{
Duration = duration;
}
}
}
|