none
Windows media player repeat function: RRS feed

  • Question

  • I have used a Windows media player control in Studio 2008 using C#.

    If the 'real' Microsoft media player is used, via the Start button, then there is a setting to 'turn repeat on' which allows a video to be replayed.

    But the media player control doesn't have this option.

    Does anyone know if there is a way of enabling this?

    Thanks.

    MartinW.


    • Edited by woody01530 Monday, January 30, 2012 2:53 PM
    • Moved by Leo Liu - MSFT Tuesday, January 31, 2012 5:15 AM Moved for better support. (From:Visual C# General)
    Monday, January 30, 2012 1:46 PM

All replies

  • This should work for you:

      private void mediaElement1_MediaEnded(object sender, RoutedEventArgs e)
      {
       mediaElement1.Position = new TimeSpan();
      }
    
    

    I will leave it up to you to put in your conditional logic to determine if the media should be looped or not.


    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.
    • Proposed as answer by TSoftware-Old Thursday, February 2, 2012 3:37 AM
    Monday, January 30, 2012 4:43 PM
  • Hi Thomas.

    This seems like a solution.

    Thanks for the reply.

    MartinW.

    P.s. I was on holiday yesterday & this morning so sorry for only just replying.
    • Edited by woody01530 Wednesday, February 1, 2012 1:15 PM
    Wednesday, February 1, 2012 1:12 PM