private void DisconnectHostedVisualFromSourceWorker() { _backgroundDispatcher.VerifyAccess(); using (_backgroundPresentationSource) { _backgroundPresentationSource = null; } }
private void ConnectHostedPresentationSource() { var presentationSource = new VisualTargetPresentationSource((HostVisual)Child); var containedElement = _containedElement; presentationSource.RootVisual = containedElement; _backgroundPresentationSource = presentationSource; }