Customizing Playback

Once MediaElement’s source is set and MediaOpened is raised, the media starts playing automatically. If you don’t want it to, then set AutoPlay to false. When the user switches away from your app, any playing MediaElement automatically mutes. It then automatically unmutes once your app comes back to the foreground.

You can set MediaElement’s IsFullWindow property to true to make it automatically occupy the entire contents of your window. In this mode, it covers all other elements and ignores any customizations to its rendering (Opacity, RenderTransform, Projection, Margin, and so on). Think of this as a full-screen mode, except that it stays within the confines of your window if the user is sharing the screen with multiple ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.