public async Task DisposeMediaAsync() { if (HasMedia) { await _mediaView.DisposeMediaAsync(); } }
public MediaPreviewPage(MediaObject media) { Title = "Preview"; MediaView mediaView = new MediaView(); Content = mediaView; Appearing += async(s, e) => { await mediaView.SetMediaAsync(media); }; Disappearing += async(s, e) => { await mediaView.DisposeMediaAsync(); }; }