MediaElement usage

Jun 11, 2015 at 2:08 PM

Has anyone tried to use this library for MediaElement? I have set up a simple TransitionElement:
<transc:TransitionElement x:Name="TransitionBox" ContentTemplate="{StaticResource ImageFileInfoTemplate}">
                <trans:RandomTransitionSelector TransitionDuration="0:0:1">
                        <refl:AssemblyName Name="Transitionals" />
and the template looks like this:
        <DataTemplate x:Key="ImageFileInfoTemplate">
            <Grid x:Name="TemplateGrid" Background="Green">
                <MediaElement MediaEnded="mediaPlayer_MediaEnded" Loaded="mediaPlayer_Loaded" Source="{Binding Path=path}" />
But the problem is that after the animation has completed, media disappears for a short moment and then appears again. It looks like it's being resetted, because if the media is video, after the ficler, it starts from the beginning. I checked, and the TransitionBeginning event is happening only once as it should be. So I don't know what is the problem.

And thanks for the great library!
Jun 12, 2015 at 3:57 PM
To be completely honest guys, Transitionals hasn't been maintained in years. I did the work to extract this code out of Microsoft product that never saw the light of day and brought it to CodePlex. Unfortunately, not much as been done with it since.

The blinking and time loss you are seeing, if I remember correctly, is probably due to the way some of the transitions were implemented. Some of them removed the child from the TransitionElement and put the child into another control during animation, then brought it back. You could try a different transition or try modifying the code in Transition itself, but this is sort of theoretical. I don't know for sure it's possible or would fix your issue. It's honestly been since around 2008 that I looked at this source code. (Jeez, has it really been 7 years!?!?)

Several (though not all) of these transitions could be created with pure storyboards. For example, the Cube transition can be done using Viewport3D:

Some of the cross wipe animations could be done using an OpacityMask, maybe with a gradient if you want soft edges to the wipe.

Anyway, sorry I haven't been more help. My role has changed pretty dramatically since I started this project and my focus is all on Windows Store development. The WinRT / UAP runtimes don't support some of the architecture that Transitionals was written on. Maybe someday I'll create a new Transitionals project that uses pure storyboards like I mentioned above.