public async Task SetSourceAsync(MediaElement mediaElement, StorageFile file)
 {
     if (file != null)
     {
         mediaElement.Stop();
         mediaElement.SetPlaybackSource(MediaSource.CreateFromStorageFile(file));
     }
 }
        internal async Task LoadSelectedVideo()
        {
            var filePicker = new Windows.Storage.Pickers.FileOpenPicker();
            filePicker.FileTypeFilter.Add(".mp4");
            filePicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.VideosLibrary;
            StorageFile file = await filePicker.PickSingleFileAsync();

            if (file != null)
            {
                var mediaSource = MediaSource.CreateFromStorageFile(file);

                SelectedVideo = new MediaElement { AutoPlay = false, AreTransportControlsEnabled = true, TransportControls = new MediaTransportControls() };
                IsPlayingVideo = true;

                SelectedVideo.SetPlaybackSource(mediaSource);
            }
        }