1

So I've been trying to play a simple WAV file from my WinForms application. I've defined a MediaElement but when I try to get its current state, I can't see the CurrentState - does it has to do anything with ElementHost, UserControl etc.?

Screenshot: enter image description here

FitzChivalry
  • 339
  • 2
  • 19

1 Answers1

1

If you are using the WPF control called MediaElement in an ElementHost then I have to say that MediaElement doesn't have a property called CurrentState.

https://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=vs.110).aspx

You are probably mixing it up with the Silverlight one called the same:

https://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(VS.95).aspx

This is a possible solution though:

https://stackoverflow.com/a/16819598/4620101

Community
  • 1
  • 1
Szabolcs Dézsi
  • 8,743
  • 21
  • 29