コード例 #1
0
        public void SetBackgroundVideo(string path)
        {
            StopBackgroundVideo();

            if (IsHostBackground)
            {
                hostWindow.SetBackgroundVideo(path);
            }
            else
            {
                SetTransparentBackground();
                mediaelement.Source = new Uri(path, UriKind.Relative);
                mediaelement.Play();
            }

            SetCurrentWindowToTop();
        }
コード例 #2
0
 public void SetHostBackgroundVideo(string path, UriKind uriKind = UriKind.Relative)
 {
     hostWindow.SetBackgroundVideo(path, uriKind);
     this.Visibility = Visibility.Hidden;
     this.Visibility = Visibility.Visible;
 }