views:

174

answers:

0

Hi All,

I have a very simple Storyboard with an Int32Animation that targets a custom DP on my class.

I have an OnChanged callback for my DP, that does a Console.WriteLine("Current Value: " + MyDP).

When I run the storyboard, I can see the Console output just fine, and when I pause the storyboard, the Console output stops, BUT, when I resume the storyboard, the DP is NOT the next value at it should be. It continues increasing even though the storyboard has stopped.

Has anyone had anything like this happen to them?

here is a code snippet of what Im doing

            Int32Animation element = new Int32Animation();
            element.From = 0;
            element.To = targetTo;
            element.Duration = dur;
            Storyboard.SetTargetProperty(element, new PropertyPath(CurrentFrameProperty));
            _filmstripStoryboard = new Storyboard {SpeedRatio = this.FrameRate};
            _filmstripStoryboard.Children.Add(element);


        public void Start()
        {
            _filmstripStoryboard.Begin(this, true);
        }

        public void Pause()
        {
            _filmstripStoryboard.Pause(this);
        }

        public void Unpause()
        {
            _filmstripStoryboard.Resume(this);
        }