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}">