0

I am creating a custom control using c# in windows form application that uses windows media player control. I want to create a property isPlaying as a boolean. If its true, the video should play and if its false, it should pause.

In simple words, I have created a new user control and have inserted a windows media player control in it and I have kept its control box out of the control so its not visible. I now want to create a true/false property for it named isPlayingand if its true, the video should play and if its false, it should pause.

tejasgupta
  • 111
  • 3
  • 14

1 Answers1

0

Do you mean something as simple as this ?

private bool _isPlaying = false;

public bool Isplaying
{
    get { return _isPlaying; }
    set 
    {
        _isPlaying = value;

        if (_isPlaying)
        {
            // play vid here
        }
        else
        {
           // stop video here
        }
    }
}
GuidoG
  • 11,359
  • 6
  • 44
  • 79