Closed brettnguyen closed 2 years ago
I see that ItemsSource is bound to highlights
ItemsSource="{Binding highlights}"
But you call pause on mediaElements
.
It is most probably an error in your code.
Make sure that you you get an appropriate item from mediaelements collection for stopping it
ItemDisappearing giving me this error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" specifically using the mediaelement from the community toolkit like this in my .cs page "mediaElements[args.Index].Pause();".
links to my xaml and xaml.cs
https://github.com/brettnguyen/CollegeVSDemo/blob/master/CollegeVS/CollegeVS/Views/HomePages/CLGVSHome.xaml
https://github.com/brettnguyen/CollegeVSDemo/blob/master/CollegeVS/CollegeVS/Views/HomePages/CLGVSHome.xaml.cs