Quantcast
Channel: User Liyun Zhang - MSFT - Stack Overflow
Viewing all articles
Browse latest Browse all 444

Answer by Liyun Zhang - MSFT for MAUI: Pop up page is loading on LIVE running and not loading when normally opens the app

$
0
0

I cloned your project and reproduced your problem. And when I run the project in the release mode, it crushed and the logs show the following error:

[Microsoft.Maui.Controls.Xaml.XamlParseException]: Position 51:17. Can not find the object referenced by `MymediaElement`

And I checked the DRAudioPopUpPage.xaml, there is no <MediaElement x:Name="MymediaElement" .../> in it. So the app crashed.

To fix it, you can bind the Slider to the correct MediaElement. And I see you declared public static MediaElement MymediaElement; in the DRAudioPopUpPage. So you can bind it to the static MediaElement such as:

  xmlns:local="clr-namespace:CatholicBrain.Daily_Activities"<!--- the namespace of the DRAudioPopUpPage -->........      Maximum="{Binding Source={x:Static local:DRAudioPopUpPage.MyMediaElement}, Path=Duration.TotalSeconds}"      Value="{Binding Source={x:Static local:DRAudioPopUpPage.MyMediaElement}, Path=Position.TotalSeconds, Mode=OneWay}">

Viewing all articles
Browse latest Browse all 444

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>