コード例 #1
0
 public async Task PlayTest()
 {
     await StartSTATask(() =>
     {
         Image i = new Image();
         ControlBarHelper.SetPausePlayImage(false, i);
         Assert.Equal(new Uri(@"/CapstoneLayoutTest;component/Images/ic_play_arrow_white_24dp.png", UriKind.Relative), (i.Source as BitmapImage).UriSource);
     });
 }
コード例 #2
0
        /// <summary>
        /// Plays or pauses the video depending on the current video state
        /// </summary>
        private void PausePlay()
        {
            switch (videoState)
            {
            case true:
                mediaElement.Pause();
                ControlBarHelper.SetPausePlayImage(false, pausePlayImage);
                videoState = false;
                break;

            case false:
                mediaElement.Play();
                ControlBarHelper.SetPausePlayImage(true, pausePlayImage);
                videoState = true;
                break;
            }
        }