Replies: 1 comment
-
[Obsolete("Obsolete")]
private void CarouselView_OnCurrentItemChanged(object? sender, CurrentItemChangedEventArgs e)
{
_oldMediaElement?.Stop();
if (sender is not CarouselView carouselView) return;
if (carouselView.VisibleViews.Count < 1) return;
var view = carouselView.VisibleViews[1];
var mediaElement = view?.LogicalChildren.FirstOrDefault() as MediaElement;
mediaElement?.Play();
_oldMediaElement = mediaElement;
}
```
in VisibleViews Collection have 2 Child i just say, i pick the correct child mediaElement and Play it now works. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
RSReswin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
2025-05-08.23-23-44.mp4
Issue : when i scroll the CarouselView current mediaElement was not playing and old mediaElement was playing.
expecting : when i scroll i wand to play current mediaElement and wand to stop playing old mediaElement.
Beta Was this translation helpful? Give feedback.
All reactions