public void SetupRenderer(uint foregroundProcessId, IMediaSource source, Windows.Foundation.Size videoControlSize) { if (_mediaElement != null) { Action fn = (() => { _mediaElement.SetMediaStreamSource(source); }); var asyncOp = _dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, new DispatchedHandler(fn)); _isSetup = true; } }