Exemple #1
0
            void AnimationCompleted(object sender, EventArgs e)
            {
                //Debug.WriteLine("AnimationCompleted.");

                AnimationClock      clock = (AnimationClock)sender;
                ActiveAnimationInfo info  = _activeAnimations[clock];

                object value = info.element.GetValue(info.dp);

                info.element.BeginAnimation(info.dp, null);
                info.element.SetValue(info.dp, value);
                info.element.ApplyAnimationClock(info.dp, null);

                _activeAnimations.Remove(clock);

                //Debug.WriteLine("  _activeAnimations.Count: " + _activeAnimations.Count);
            }
Exemple #2
0
            public void RemoveAll()
            {
                if (_activeAnimations.Count == 0)
                {
                    return;
                }

                foreach (var item in _activeAnimations.Keys)
                {
                    ActiveAnimationInfo info = _activeAnimations[item];

                    object value = info.element.GetValue(info.dp);
                    info.element.BeginAnimation(info.dp, null);
                    info.element.SetValue(info.dp, value);
                    info.element.ApplyAnimationClock(info.dp, null);

                    //item.Controller.Remove();
                    item.Controller.Stop();
                }

                _activeAnimations.Clear();
            }