This project is read-only.

Fade Out video player when removing it from the window

Topics: Windows 8 Xaml
Aug 15, 2012 at 3:16 PM


I am currently using this video player in my app. The video plays in full screen always, but when the user wants to close it, or the video ends, I'd like to apply a fade out effect from the player going back to the app. I haven't found a way to do this, I'd need access to the MediaElement.Opacity I guess. Any suggestions?


Aug 16, 2012 at 11:57 PM

pedropaf, You can set the opacity on the MediaPlayer itself and it will affect everything (control panel as well as video).

My suggestion would be to watch for the MediaEnded event and in it, animate the opacity of MediaPlayer via storyboard (VisualStates are good for this).

Hope this helps,