Problem with stopping video on back press in UWP

Problem with stopping video on back press in UWP

I have a UWP app with NavigationView that handles the backstack in different frames. The back press is handled in my MainPage.xaml by the function:

I have a UWP app with NavigationView that handles the backstack in different frames. The back press is handled in my MainPage.xaml by the function:

private bool On_BackRequested()
        {
            if (contentFrame.CanGoBack)
            {
                contentFrame.GoBack();
                Debug.WriteLine(contentFrame.);
                return true;
            }
            return false;
        }

But the problem arises when there is a MediaPlayerElement playing videos in a frame. The back press is handled properly but the video doesn't stop playing (I know this because the audio from the video is still playing in the background).

How can I stop the video playback during the back press method? Can I access a certain function from the childframe to stop the video?

xaml windows

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Windows Server Setup and Management - Global TechForce

Are you looking for the best outsource it services company for [windows server setup](https://www.global-techforce.com/solutions-for-your-business/windows-server-support/ "windows server setup")? Don't forget to visit Global TechForce for best and...

XAML Islands

In this episode, Robert is joined by Adam Braden. They continue the 2 part conversation they had on modernizing existing Windows applications and have a deeper discussion on XAML Islands. XAML Islands is a technology that enables Windows developers to use new pieces of UI from the Universal Windows Platform (UWP) on their existing Win32 Applications, including Windows Forms and WPF technologies. This enables them to gradually modernize their apps at their own pace, making use of their current code as much as they want.

Introducing XAML Studio

As a XAML developer, you may sometimes wish you had the ability to quickly prototype your UI and debug your markup without having to load a project in Visual Studio. This can be a huge workflow boost for designers or even for developers just wanting to try out new ideas. With the release of XAML Studio, we are able to close this grab for creators and also enable much more.

gcc compiler on Windows

I'm currently working on pure C++ library in Linux using g++, but from Windows (through VPN). It is very inconvenient because the connection is very slow. I'd like to get library's sources on Windows and use a gcc ported to Windows (e.g. MinGW or CygWin). But I'd like to know to what extent linux gcc compiler is compatible with Windows gcc compiler? Are they built from the same code base?

How To Install Docker on Windows

In this Docker tutorial, you'll learn how to set up Docker on your Windows machine.