/// <summary> /// Code to project a video /// If the Header value is not provided, the content is projected in full screen mode /// </summary> /// <param name="Content"></param> /// <param name="header"></param> private void ShowVideo(String Content, String header) { try { //Check if header is null //Null - Show full screen content if (String.IsNullOrEmpty(header)) { //Show the full screen video control currentVideoURI = Helper.GetAssetURI(Content); FullScreenVideoControl.Source = new Uri(currentVideoURI); FullScreenContentGrid.Visibility = Visibility.Collapsed; FullScreenVideoGrid.Visibility = Visibility.Visible; FullScreenVideoControl.Play(); } else { TitleLabel.Text = header; currentVideoURI = Helper.GetAssetURI(Content); VideoControl.Source = new Uri(currentVideoURI); ContentGrid.Visibility = Visibility.Collapsed; FullScreenContentGrid.Visibility = Visibility.Collapsed; FullScreenVideoGrid.Visibility = Visibility.Collapsed; VideoControl.Visibility = Visibility.Visible; VideoGrid.Visibility = Visibility.Visible; VideoControl.Play(); } this.UpdateLayout(); } catch (Exception ex) { RippleCommonUtilities.LoggingHelper.LogTrace(1, "Went wrong in Show Video method {0}", ex.Message); } }
private void FullScreenVideoControl_MediaEnded(object sender, RoutedEventArgs e) { if (currentScreenContent == ContentType.Video && loopVideo && (!String.IsNullOrEmpty(currentVideoURI))) { //Replay the video FullScreenVideoControl.Source = new Uri(currentVideoURI); FullScreenVideoControl.Play(); } }