Strange behaviour when moving the player

Aug 27, 2010 at 3:32 PM

Hi all,

I need to move an instance of the SMF from one grid to another one by clicking on a button.

When the application is starting, the SMFPlayer is playing a video in grid 1. When clicking on the button, I'm instanciating a new SMFPlayer object and "copy" the original like this :

SMFPlayer _smfPlayerObjTyped = theOriginalSMFPlayer;

Then I'm removing the original from grid one and copy the copied SMFPlayer (smfPlayerObjTyped) into grid 2, just like this :

Grid1.Children.RemoveAt(0);

Grid2.Children.Add(smfPlayerObjTyped);

 

That's working well : the player is moving from one grid to another....except that it stopped. And impossible to catch events like MediaFailed or Playstate.

If we do the same with any kind of content like textblock or image, there is no problem.

Is there a way to prevent this behaviour, or better, is there a way for moving smoothly content element from one point to another in the application design without using this method?

 

Thanks a lot

 

escotto

Aug 30, 2010 at 3:44 PM

Maybe you can put it in the grid and hide it so instead of copying it you already have an instance...  just join the feed then...  just a thought...  could it be that a post back or partial post back is causing the player to stop as it is being loaded...  just a couple of thoughts...