aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Editors/AnimationSetup.cs
blob: 6313cc206a2e35bab56aec60e3d0adb5d38533ec (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Animation;

namespace Tango.Editors
{
    /// <summary>
    /// Represents an animation definition including the actual animation, the dependency object and dependency property.
    /// </summary>
    public class AnimationSetup 
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AnimationSetup"/> class.
        /// </summary>
        public AnimationSetup()
        {

        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AnimationSetup"/> class.
        /// </summary>
        /// <param name="animation">The animation.</param>
        /// <param name="dependencyObject">The dependency object.</param>
        /// <param name="dependencyProperty">The dependency property.</param>
        public AnimationSetup(AnimationTimeline animation, DependencyObject dependencyObject, DependencyProperty dependencyProperty)
        {
            Animation = animation;
            DependencyObject = dependencyObject;
            DependencyProperty = dependencyProperty;
        }

        /// <summary>
        /// Gets or sets the animation.
        /// </summary>
        public AnimationTimeline Animation { get; set; }

        /// <summary>
        /// Gets or sets the dependency object.
        /// </summary>
        public DependencyObject DependencyObject { get; set; }

        /// <summary>
        /// Gets or sets the dependency property.
        /// </summary>
        public DependencyProperty DependencyProperty { get; set; }

        /// <summary>
        /// Clones animation setup.
        /// </summary>
        /// <returns></returns>
        public AnimationSetup Clone()
        {
            return new AnimationSetup(Animation.Clone(), DependencyObject, DependencyProperty);
        }
    }
}