private void CompositionHost_Loaded(object sender, RoutedEventArgs e) { capturer = new BasicApplication(CHC.Compositor); CHC.SetChild(capturer.Visual); var viewModel = MainVM; viewModel.Capturer = capturer; }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { capturer?.Dispose(); capturer = null; var viewModel = MainVM; viewModel.Capturer = null; } disposed = true; } }