locked
Storyboard animation frozen when app is suspending

    Question

  • Hi,

    I am using long running storyboard animations in my app. When the user switches to another app or kills the app, the Suspending event is called. The app acquires a deferal and tries to stop any animation processing prematurely. But, the animation driven by another thread (Dispatcher.RunAsync) seems to be frozen. It no more reaches the Completed event. What can I do in this case?    

    PS: I have also implemented a stop button for the user to stop the long running animation. This button uses an awaitable async method which uses the AutoResetEvent.WaitOne method to wait for the completion. This method functions as expected as long as the app is not in the Suspending state.  

    Thanks for any answer
    Paul   


    PaulBiz


    Monday, February 24, 2014 12:47 PM

Answers

  • Hi,

    excuse me for this thread. It was my own fault. The long running animation did not complete because the driving procedure starts a new thread while in suspending mode already. I think, this is not allowed. Anyway, all threads running to normal end in suspending mode and this allows me to do all finalization in a consistent manner.

    Paul


    PaulBiz


    • Marked as answer by PaulBiz Tuesday, February 25, 2014 5:05 PM
    • Edited by PaulBiz Tuesday, February 25, 2014 5:06 PM
    Tuesday, February 25, 2014 5:05 PM

All replies

  • What language are you using so we can get you to the appropriate forum?
    Monday, February 24, 2014 3:41 PM
    Owner
  • I am using C#.

    PaulBiz

    Monday, February 24, 2014 4:00 PM
  • Hi,

    excuse me for this thread. It was my own fault. The long running animation did not complete because the driving procedure starts a new thread while in suspending mode already. I think, this is not allowed. Anyway, all threads running to normal end in suspending mode and this allows me to do all finalization in a consistent manner.

    Paul


    PaulBiz


    • Marked as answer by PaulBiz Tuesday, February 25, 2014 5:05 PM
    • Edited by PaulBiz Tuesday, February 25, 2014 5:06 PM
    Tuesday, February 25, 2014 5:05 PM