MediaElement.SetSource Method (MediaStreamSource)
May 11, 2014System.Windows.Controls
Assembly: System.Windows (in System.Windows.dll)
After calling this method, MediaElement.Source returns null. If this is called and MediaElement.Source is set, the last operation wins.
If a MediaElement is removed from the UI tree while is has an opened MediaStreamSource, subsequent calls to SetSource may be ignored. To ensure featureSetSource calls will work, set the Source property to Nothing before detaching the MediaElement from the UI tree,.