Home > DeveloperSection > Forums > Pausing window wpf application
Brad Pitt
Brad Pitt

Total Post:61

Points:429
Posted on    May-13-2013 2:36 AM

 WPF WPF 
Ratings:


 1 Reply(s)
 1059  View(s)
Rate this:
Hi Expert! 

I'd like to play a video when no mouse action is launch and the cursor is not moving for 10 seconds. I'd like to know how can i test this condition in WPF and what is the best method to do it.

Any help will be appreciated!
Thanks in advance!



AVADHESH PATEL

Total Post:604

Points:4228
Posted on    May-13-2013 9:29 AM

Hi Brad!

Try as following 

 if (button1.Content.Equals("Play"))
            {
                button1.Content = "Pause";
                mediaElement1.Play();
            }
            else
            {
                button1.Content = "Play";
                mediaElement1.Pause();
            }

I hope it is helpful to you

Don't want to miss updates? Please click the below button!

Follow MindStick