/// <summary>
        /// Starts the transition.
        /// </summary>
        public void run()
        {
            // We find the current start values for the properties we
            // are animating...
            foreach (TransitionedPropertyInfo info in m_listTransitionedProperties)
            {
                if (info.IsComplex)
                {
                    (info.target as UIElement).Dispatcher.Invoke(DispatcherPriority.Input, new Action(() =>
                    {
                        var value       = ComplexProperty.GetComplexValue(info.target, info.propertyPath);
                        info.startValue = info.managedType.copy(value);
                    }));
                }
                else
                {
                    object value = info.propertyInfo.GetValue(info.target, null);
                    info.startValue = info.managedType.copy(value);
                }
            }

            // We start the stopwatch. We use this when the timer ticks to measure
            // how long the transition has been runnning for...
            m_Stopwatch.Reset();
            m_Stopwatch.Start();

            // We register this transition with the transition manager...
            TransitionManager.getInstance().register(this);
        }
 /// <summary>
 /// Singleton's getInstance method.
 /// </summary>
 public static TransitionManager getInstance()
 {
     if (m_Instance == null)
     {
         m_Instance = new TransitionManager();
     }
     return m_Instance;
 }
Beispiel #3
0
 public static TransitionManager getInstance()
 {
     if (m_Instance == null)
     {
         m_Instance = new TransitionManager();
     }
     return(m_Instance);
 }
Beispiel #4
0
        public void run()
        {
            foreach (var transitionedProperty in TransitionedProperties)
            {
                var o = transitionedProperty.propertyInfo.GetValue(transitionedProperty.target, null);
                transitionedProperty.startValue = transitionedProperty.managedType.copy(o);
            }

            m_Stopwatch.Reset();
            m_Stopwatch.Start();
            TransitionManager.getInstance().register(this);
        }
Beispiel #5
0
        /// <summary>
        /// Starts the transition.
        /// </summary>
        public void run()
        {
            // We find the current start values for the properties we
            // are animating...
            foreach (TransitionedPropertyInfo info in m_listTransitionedProperties)
            {
                object value = info.propertyInfo.GetValue(info.target, null);
                info.startValue = info.managedType.copy(value);
            }

            // We start the stopwatch. We use this when the timer ticks to measure
            // how long the transition has been runnning for...
            m_Stopwatch.Reset();
            m_Stopwatch.Start();

            // We register this transition with the transition manager...
            TransitionManager.getInstance().register(this);
        }
 /// <summary>
 /// Singleton's getInstance method.
 /// </summary>
 public static TransitionManager GetInstance()
 {
     return _instance ?? (_instance = new TransitionManager());
 }
Beispiel #7
0
 /// <summary>
 /// Singleton's getInstance method.
 /// </summary>
 public static TransitionManager GetInstance()
 {
     return(_instance ?? (_instance = new TransitionManager()));
 }