Animation issue on UI Thread?

Topics: Prism v4 - Silverlight 4
Nov 5, 2010 at 10:55 PM

Running prism v4 for sl4 drop 10.  I have a continuous animation running and only when I activate a module (loaded prior to animation start) the animation pauses for a second during the below code call.

//show the view              
IRegion region = _regionManager.Regions[ViewRegions.ContentRegion.ToString()];                
object view = region.GetView(Views.ContactInfo.ToString());              

If i do anything else in the app such as long running process, loading controls dynamically (without prism) or even running other animations at the same time this visual artifact is not present. What is prism doing during the activate process that is causing the UI thread to seize? Is there a way to get around this? (I've already tried new threads, dispatching the activate event from the new thread to the UI thread and even using the event aggregators ThreadOption.UIThread to no avail)


Nov 8, 2010 at 7:46 PM


There is no similar issues reported so far. On the other hand, I tried to reproduce this behavior and found no issues.

I added a RepeatBehavior "Forever" to the logo animation in the Stock Trader RI. Then I added some views to a region using View Injection as shown in your code. You can download a repro sample from here.

Have you detected the same situation using a different animation? 

Hope this helps.

Fernando Antivero


Nov 11, 2010 at 5:46 PM

Turns out the underlying problem related to Silverlight and not Prism and how it refreshes the view stack when modifying the visibility property on controls. Thank you for looking into this though, I appreciate it!


Nov 11, 2010 at 7:03 PM
Edited Nov 11, 2010 at 7:04 PM


Nice to see that you found the basis of this situation, and thanks for sharing this with the rest of the community, since other users with similar situations can find this helpful.

Please let me know if you have any other question.

Fernando Antivero