示例#1
0
 public async Task DisposeMediaAsync()
 {
     if (HasMedia)
     {
         await _mediaView.DisposeMediaAsync();
     }
 }
示例#2
0
        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();
            };
        }